fix SyntaxWarning for py38 and remove py33 on travis

This commit is contained in:
Rossen Georgiev 2019-10-08 19:42:44 +01:00
parent c3c886e5c6
commit 2f0f74a06d
3 changed files with 6 additions and 7 deletions

View File

@ -2,7 +2,6 @@ language: python
sudo: false sudo: false
python: python:
- "2.7" - "2.7"
- "3.3"
- "3.4" - "3.4"
- "3.5" - "3.5"
- "3.6" - "3.6"

View File

@ -140,15 +140,15 @@ def parse_mice(dstcall, body):
# apply position ambiguity # apply position ambiguity
# routines adjust longitude to center of the ambiguity box # routines adjust longitude to center of the ambiguity box
if posambiguity is 4: if posambiguity == 4:
lngminutes = 30 lngminutes = 30
elif posambiguity is 3: elif posambiguity == 3:
lngminutes = (math.floor(lngminutes/10) + 0.5) * 10 lngminutes = (math.floor(lngminutes/10) + 0.5) * 10
elif posambiguity is 2: elif posambiguity == 2:
lngminutes = math.floor(lngminutes) + 0.5 lngminutes = math.floor(lngminutes) + 0.5
elif posambiguity is 1: elif posambiguity == 1:
lngminutes = (math.floor(lngminutes*10) + 0.5) / 10.0 lngminutes = (math.floor(lngminutes*10) + 0.5) / 10.0
elif posambiguity is not 0: elif posambiguity != 0:
raise ParseError("Unsupported position ambiguity: %d" % posambiguity) raise ParseError("Unsupported position ambiguity: %d" % posambiguity)
longitude += lngminutes / 60.0 longitude += lngminutes / 60.0

View File

@ -47,7 +47,7 @@ class ParseCommentTelemetry(unittest.TestCase):
bits = None bits = None
if len(vals) is 5 and randint(1, 10) > 5: if len(vals) == 5 and randint(1, 10) > 5:
bits = "{0:08b}".format(randint(0, 255))[::-1] bits = "{0:08b}".format(randint(0, 255))[::-1]
testData = self.genTelem(i, vals, bits) testData = self.genTelem(i, vals, bits)