[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, debian, updated. upstream/0.9.5.5-717-g0f98819
Michael 'Mickey' Lauer
mickey at vanille-media.de
Sat Aug 6 08:19:59 UTC 2011
The following commit has been merged in the debian branch:
commit ee765e4a34b3eccf0da3d04f7b6e3a00ee099f5e
Author: Antonio Ospite <ospite at studenti.unina.it>
Date: Fri May 21 14:13:52 2010 +0200
ogsmd: device.py, detect modem creation failure
Some devices may be in a certain status that makes impossible to
initialize the modem, in these cases we should not instanciate the
actual Modem class and return None, so we need to detect that.
Signed-off-by: Antonio Ospite <ospite at studenti.unina.it>
diff --git a/framework/subsystems/ogsmd/device.py b/framework/subsystems/ogsmd/device.py
index a06802f..2c88d49 100644
--- a/framework/subsystems/ogsmd/device.py
+++ b/framework/subsystems/ogsmd/device.py
@@ -81,6 +81,11 @@ class Device( resource.Resource ):
on_error( resource.ResourceError( estring ) )
else:
self.modem = Modem( self, self.bus )
+ if self.modem is None:
+ estring = "Cannot create Modem %s" % ( self.modemtype )
+ logger.error( estring )
+ on_error( resource.ResourceError( estring ) )
+ return
setCurrentModem( self.modem )
self.modem.open( on_ok, on_error )
--
FSO frameworkd Debian packaging
More information about the pkg-fso-commits
mailing list