summaryrefslogtreecommitdiff
path: root/gpsfake.py
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2005-06-24 20:08:20 +0000
committerEric S. Raymond <esr@thyrsus.com>2005-06-24 20:08:20 +0000
commit08202f36db237797068a02129ac58150734aa31e (patch)
tree276c0705ed6bf105b07bc8a36d937f8b380adcc7 /gpsfake.py
parent97f545e1c7d20959afed191af6d8e57948f5f7b4 (diff)
downloadgpsd-08202f36db237797068a02129ac58150734aa31e.tar.gz
Fix an error in the exerciser for gps.py.
Diffstat (limited to 'gpsfake.py')
-rw-r--r--gpsfake.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gpsfake.py b/gpsfake.py
index 21e271a3..13708743 100644
--- a/gpsfake.py
+++ b/gpsfake.py
@@ -138,7 +138,7 @@ class FakeGPS:
"Increment pseudodevice's reader count, starting it if necessary."
self.readers += 1
if self.readers == 1:
- self.thread = threading.Thread(self.__feed())
+ self.thread = threading.Thread(target=self.__feed)
while not self.slave_is_open():
time.sleep(0.01);
if thread:
@@ -254,7 +254,7 @@ class TestSession:
self.clients.append(newclient)
newclient.query("of\n")
self.fakegpslist[newclient.device].start(thread=True)
- session.set_thread_hook(self.reporter)
+ newclient.set_thread_hook(lambda x: self.reporter(x+"\n"))
if commands:
newclient.query(commands)
return newclient