Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
103f5f2a
Commit
103f5f2a
authored
Jul 10, 2006
by
Russ Fish
Browse files
Break long line of logic to avoid FP errors.
parent
9234f346
Changes
1
Hide whitespace changes
Inline
Side-by-side
tbsetup/plab/libplab.py.in
View file @
103f5f2a
...
...
@@ -440,7 +440,12 @@ class Plab:
elif
(
attr
==
"LATITUDE"
)
or
(
attr
==
"LONGITUDE"
):
# Special rules for latitude and longitude to avoid
# FP errors
if
(
ent
[
attr
]
!=
None
and
plabent
[
attr
]
!=
None
)
and
(
ent
[
attr
]
!=
""
and
plabent
[
attr
]
!=
""
)
and
((
float
(
ent
[
attr
])
>
(
float
(
plabent
[
attr
])
+
LATLONG_DELTA
))
or
(
float
(
ent
[
attr
])
<
(
float
(
plabent
[
attr
])
-
LATLONG_DELTA
))):
if
(
ent
[
attr
]
!=
None
and
plabent
[
attr
]
!=
None
)
\
and
(
ent
[
attr
]
!=
""
and
plabent
[
attr
]
!=
""
)
\
and
((
float
(
ent
[
attr
])
>
\
(
float
(
plabent
[
attr
])
+
LATLONG_DELTA
))
\
or
(
float
(
ent
[
attr
])
<
\
(
float
(
plabent
[
attr
])
-
LATLONG_DELTA
))):
diff
[
attr
]
=
(
ent
[
attr
],
plabent
[
attr
])
else
:
same
[
attr
]
=
ent
[
attr
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment