summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-14 16:29:05 -0700
committerGary E. Miller <gem@rellim.com>2018-09-14 16:29:05 -0700
commit05f009fe7b695ebfed551853b16aa69df2aeb84e (patch)
treec624a6b84770fd2e6ee05378a0dda16d2caf5f74 /gps
parentb50d3fc108d738eb3db6cc5542891a10b8fcc85c (diff)
downloadgpsd-05f009fe7b695ebfed551853b16aa69df2aeb84e.tar.gz
gps/client: Commen that ConnectionRefusedError is not in Python 2.
So gps/client crashes on a failed connection.
Diffstat (limited to 'gps')
-rw-r--r--gps/client.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gps/client.py b/gps/client.py
index 989b1d15..27027bc7 100644
--- a/gps/client.py
+++ b/gps/client.py
@@ -66,6 +66,8 @@ class gpscommon(object):
print('connected to tcp://{}:{}'.format(host, port))
break
except ConnectionRefusedError as cre:
+ # Python 2.7 doc does have this exception
+ # Python 3 says is is same as errno ECONNREFUSED
if self.verbose > 1:
msg = str(cre) + ' (to {}:{})'.format(host, port)
sys.stderr.write("error: {}\n".format(msg.strip()))