Changeset 3618
- Timestamp:
- 12/10/08 21:00:14 (3 months ago)
- Location:
- trunk/beacon/src/server
- Files:
-
- 2 modified
-
devices.py (modified) (1 diff)
-
hal.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/beacon/src/server/devices.py
r3612 r3618 48 48 try: 49 49 import hal 50 except ImportError, e: 51 log.error(e) 52 log.error('HAL support disabled') 53 hal = None 54 try: 55 import cdrom 50 56 except ImportError: 51 log.error('hal support disabled') 52 hal = None 53 try: 54 import cdrom 55 except ImportError: 56 log.error('cdrom support disabled') 57 cdrom = None 57 log.error('Cdrom support disabled') 58 cdrom = None 58 59 59 60 class HardwareMonitor(object): -
trunk/beacon/src/server/hal.py
r3608 r3618 164 164 165 165 _bus = None 166 _connection_timeout = 5167 166 168 167 @kaa.threaded(kaa.GOBJECT) 169 168 def start(): 170 169 """ 171 Connect to D BUSand start to connect to hal.170 Connect to D-Bus and start to connect to hal. 172 171 """ 173 172 global _bus 174 global _connection_timeout175 _connection_timeout -= 1176 173 try: 177 174 if not _bus: … … 179 176 except Exception, e: 180 177 # unable to connect to dbus 181 if not _connection_timeout: 182 # give up 183 emit_signal('failed', 'unable to connect to dbus') 184 return False 185 kaa.OneShotTimer(start).start(2) 178 emit_signal('failed', 'Unable to connect to D-Bus') 186 179 return False 187 180 try: … … 189 182 except Exception, e: 190 183 # unable to connect to hal 191 emit_signal('failed', ' hal not found on dbus')184 emit_signal('failed', 'HAL not found on D-Bus') 192 185 return False 193 186 hal = dbus.Interface(obj, HAL + '.Manager')
