Skip to content

Commit

Permalink
Merge pull request #91 from robert-kisteleki/master
Browse files Browse the repository at this point in the history
cover a case where rtt_average does not exist
  • Loading branch information
chrisamin authored May 27, 2021
2 parents 242bd92 + 2d3dc1e commit c860e69
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: python
python:
- "2.7"
- "3.4"
- "3.5"
- "3.6"
- "3.7"
install:
- pip install .
- pip install nose
Expand Down
2 changes: 1 addition & 1 deletion ripe/atlas/sagan/ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def __init__(self, data, **kwargs):
self.rtt_median = None # Redefined in self._set_rtt_median()
self.packets = []

if self.rtt_average < 0:
if self.rtt_average is None or self.rtt_average < 0:
self.rtt_average = self.rtt_min = self.rtt_max = None

if 0 < self.firmware < 4460:
Expand Down
6 changes: 2 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,9 @@
"Operating System :: Unix",
"Programming Language :: Python",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.1",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Internet :: WWW/HTTP",
],
)
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist=py27,py34,py35,py36
envlist=py27,py35,py36,py37

[testenv]
commands=python setup.py test []
Expand Down

0 comments on commit c860e69

Please sign in to comment.