summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-11 00:45:33 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-11 00:45:33 -0500
commitc741fba11741459bc5b16e34cc3ba8b5184738ff (patch)
treee7e33d7b6aacf184ddb498d6ac8187705fe353bc /gps
parent1dc591fddaa2de143b75b32b4102d39b37bcf95a (diff)
downloadgpsd-c741fba11741459bc5b16e34cc3ba8b5184738ff.tar.gz
Trying to narrow down the serial-parameter error.
Diffstat (limited to 'gps')
-rw-r--r--gps/fake.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/gps/fake.py b/gps/fake.py
index cb6e7987..60ff80e6 100644
--- a/gps/fake.py
+++ b/gps/fake.py
@@ -256,7 +256,6 @@ class FakePTY(FakeGPS):
115200: termios.B115200,
230400: termios.B230400,
}
- speed = baudrates[speed] # Throw an error if the speed isn't legal
(self.fd, self.slave_fd) = pty.openpty()
self.byname = os.ttyname(self.slave_fd)
(iflag, oflag, cflag, lflag, ispeed, ospeed, cc) = termios.tcgetattr(self.slave_fd)
@@ -278,7 +277,7 @@ class FakePTY(FakeGPS):
elif parity == 'O':
iflag |= termios.INPCK
cflag |= termios.PARENB | termios.PARODD
- ispeed = ospeed = speed
+ ispeed = ospeed = baudrates[speed]
try:
termios.tcsetattr(self.slave_fd, termios.TCSANOW,
[iflag, oflag, cflag, lflag, ispeed, ospeed, cc])