diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2013-11-03 22:56:16 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2013-11-03 22:56:16 -0500 |
commit | 372c4a5a74c1f34a8d00f43eeadb6dac0253e5a9 (patch) | |
tree | 4f37243cc0199e259215c1707dcd37f45c596e1c /gps | |
parent | 1b2859d4a80f9c1bb71b848ca253d8df513ad233 (diff) | |
download | gpsd-372c4a5a74c1f34a8d00f43eeadb6dac0253e5a9.tar.gz |
TCP fake sources now work but can't be reused yet.
Diffstat (limited to 'gps')
-rw-r--r-- | gps/fake.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gps/fake.py b/gps/fake.py index fc24aa13..4126c29c 100644 --- a/gps/fake.py +++ b/gps/fake.py @@ -282,10 +282,11 @@ class FakeTCP(FakeGPS): self.dispatcher.bind((self.host, self.port)) self.dispatcher.listen(5) self.readables = [self.dispatcher] + print "** OUT OF INITIALIZATION **" def read(self): "Handle connection requests and data." - readable, _writable, _errored = select.select(self.readables, [], []) + readable, _writable, _errored = select.select(self.readables, [], [], 0) for s in readable: if s == self.dispatcher: # Connection request client_socket, _address = s.accept() @@ -306,7 +307,7 @@ class FakeTCP(FakeGPS): "Wait for the associated device(s) to drain (e.g. before closing)." for s in self.readables: if s != self.dispatcher: - s.shutdown() + s.shutdown(socket.SHUT_RDWR) class FakeUDP(FakeGPS): "A UDP broadcaster with a test log ready to be cycled to it." |