summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorFred Wright <fw@fwright.net>2017-07-14 13:59:34 -0700
committerFred Wright <fw@fwright.net>2017-07-14 13:59:34 -0700
commit81e3562ddf0817e513518dea866276729361d5e8 (patch)
tree2968fc2fa7191c04b50e3240f5ed9dbaef77c848 /gps
parent8fc40f92170b61b03406cbe363947415ac40f0a7 (diff)
downloadgpsd-81e3562ddf0817e513518dea866276729361d5e8.tar.gz
Fixes bug in gpsfake with default port.
The default port number used by gpsfake is (probably incorrectly) specified as a string rather than an integer. The shmkey derivation added in commit 1f209455 expects an integer, causing a failure when the port is not explicitly specified. This fix forces an integer where needed. TESTED: Ran "scons build-all check". Previously failing gpsfake case now works correctly.
Diffstat (limited to 'gps')
-rw-r--r--gps/fake.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gps/fake.py b/gps/fake.py
index f2fce76c..9d850518 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -549,7 +549,7 @@ class DaemonInstance(SubprogramInstance):
% (port, self.control_socket, options))
# Derive a unique SHM key from the port # to avoid collisions.
# Use 'Gp' as the prefix to avoid colliding with 'GPSD'.
- shmkey = '0x4770%.04X' % port
+ shmkey = '0x4770%.04X' % int(port)
env = {'GPSD_SHM_KEY': shmkey}
super(DaemonInstance, self).spawn('gpsd', opts, background, prefix,
env)