summaryrefslogtreecommitdiff
path: root/gps
diff options
context:
space:
mode:
authorBernd Zeimetz <bernd@bzed.de>2010-04-22 02:29:57 +0200
committerBernd Zeimetz <bernd@bzed.de>2010-04-22 03:20:02 +0200
commitc486ce9325731e9da59b4d4e8411bf7fc858bd4e (patch)
tree0718207961be9d2adac49ea88c83fb51c793b9ae /gps
parent0e5b93f7dacc5e67eaf964bfba1575e727a20c26 (diff)
downloadgpsd-c486ce9325731e9da59b4d4e8411bf7fc858bd4e.tar.gz
Return the length of the data in read().
The legth of the remaining data might be 0 if the data in the buffer ends with \n.
Diffstat (limited to 'gps')
-rwxr-xr-xgps/gps.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gps/gps.py b/gps/gps.py
index cca3f5e1..63776e6b 100755
--- a/gps/gps.py
+++ b/gps/gps.py
@@ -112,7 +112,7 @@ class gpscommon:
sys.stderr.write("poll: data is %s\n" % repr(self.response))
self.received = time.time()
# We got a \n-terminated line
- return len(self.linebuffer)
+ return len(self.response)
def send(self, commands):
"Ship commands to the daemon."