[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82
Jan Luebbe
jluebbe at debian.org
Mon Feb 2 18:51:41 UTC 2009
The following commit has been merged in the master branch:
commit 78582569e660110de406f0f4a53a8b9bcc99eb10
Author: Jan Luebbe <jluebbe at debian.org>
Date: Thu Dec 18 17:56:13 2008 +0100
otimed: accept only valid time from ogpsd
diff --git a/framework/subsystems/otimed/otimed.py b/framework/subsystems/otimed/otimed.py
index 5207190..847e721 100644
--- a/framework/subsystems/otimed/otimed.py
+++ b/framework/subsystems/otimed/otimed.py
@@ -58,11 +58,15 @@ class GPSTimeSource( TimeSource ):
)
def _handleTimeChanged( self, t ):
- self.offset = datetime.utcfromtimestamp( t ) - datetime.utcnow()
+ if t:
+ self.offset = datetime.utcfromtimestamp( t ) - datetime.utcnow()
+ logger.debug( "GPS: offset=%f", toSeconds( self.offset ) )
+ else:
+ self.offset = None
+ logger.debug( "GPS: time invalid", toSeconds( self.offset ) )
if not self.invalidTimeout is None:
gobject.source_remove( self.invalidTimeout )
self.invalidTimeout = gobject.timeout_add_seconds( 300, self._handleInvaildTimeout )
- logger.debug( "GPS: offset=%f", toSeconds( self.offset ) )
def _handleInvaildTimeout( self ):
self.offset = None
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list