Changeset 939b309 for src/python
- Timestamp:
- Sep 21, 2017, 11:58:44 AM (9 years ago)
- Branches:
- 0.5, debian/bullseye, debian/jessie, master
- Children:
- 6fbf790
- Parents:
- 74f0621
- File:
-
- 1 edited
-
src/python/gnuboat/daemon/gpsdpoller.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/python/gnuboat/daemon/gpsdpoller.py
r74f0621 r939b309 22 22 import datetime 23 23 import gps 24 import traceback 24 25 25 26 # Copied from https://gist.github.com/wolfg1969/4653340 … … 82 83 if isinstance(currentTime, float): 83 84 return datetime.datetime.fromtimestamp(currentTime) 84 return dateutil.parser.parse( self._session.fix.time)85 return dateutil.parser.parse(currentTime) 85 86 86 87 def stop(self): … … 90 91 try: 91 92 while self._running: 92 self._currentValue = self._session.next() 93 try: 94 self._currentValue = self._session.next() 95 except StopIteration: 96 break; 97 except: 98 print "Failed to read gpsd data" 99 print(traceback.format_exc()) 93 100 time.sleep(float(self._logperiod) / 2.0) 94 101 except StopIteration:
Note:
See TracChangeset
for help on using the changeset viewer.
