diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2016-04-06 17:16:09 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2016-04-06 17:16:27 -0400 |
commit | d25229a386b1bfe4092d620dc21029ffdc753df4 (patch) | |
tree | 367fc50391e3049c437ec07cb5fc40515916ce8d | |
parent | dfebe3fac76ebb27c39d6cb0a623b3b24ed95572 (diff) | |
download | gpsd-d25229a386b1bfe4092d620dc21029ffdc753df4.tar.gz |
Fix a slightly botched Python 3 move.
-rw-r--r-- | gps/client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gps/client.py b/gps/client.py index 820006b0..7ee62fea 100644 --- a/gps/client.py +++ b/gps/client.py @@ -67,7 +67,7 @@ class gpscommon: self.sock = socket.socket(af, socktype, proto) # if self.debuglevel > 0: print 'connect:', (host, port) self.sock.connect(sa) - except socket.error(msg): + except socket.error as msg: # if self.debuglevel > 0: print 'connect fail:', (host, port) self.close() continue @@ -161,7 +161,7 @@ class gpsjson: def unpack(self, buf): try: self.data = dictwrapper(json.loads(buf.strip(), encoding="ascii")) - except ValueError(e): + except ValueError as e: raise json_error(buf, e.args[0]) # Should be done for any other array-valued subobjects, too. # This particular logic can fire on SKY or RTCM2 objects. |