Пример #1
0
def hal_failure(reason):
    print "HAL module start failed:", reason
    if cdrom:
        for sig in cdrom.signals:
            cdrom.signals[sig].connect(hal.signals[sig].emit)
        print "falling back to plain cdrom module"
        cdrom.start()
Пример #2
0
def hal_failure(reason):
    print 'HAL module start failed:', reason
    if cdrom:
        for sig in cdrom.signals:
            cdrom.signals[sig].connect(hal.signals[sig].emit)
        print 'falling back to plain cdrom module'
        cdrom.start()
Пример #3
0
    from kaa.beacon.server.hwmon import hal

    signals = hal.signals
    print "Start HAL monitor"
    hal.start()
except ImportError:
    print "HAL not found"
    hal = None

try:
    from kaa.beacon.hwmon import cdrom

    if not hal:
        signals = cdrom.signals
        print "Start cdrom monitor"
        cdrom.start()
except ImportError:
    cdrom = None


def hal_failure(reason):
    print "HAL module start failed:", reason
    if cdrom:
        for sig in cdrom.signals:
            cdrom.signals[sig].connect(hal.signals[sig].emit)
        print "falling back to plain cdrom module"
        cdrom.start()


if hal and cdrom:
    signals["failed"].connect(hal_failure)
Пример #4
0
try:
    from kaa.beacon.server.hwmon import hal
    signals = hal.signals
    print 'Start HAL monitor'
    hal.start()
except ImportError:
    print 'HAL not found'
    hal = None

try:
    from kaa.beacon.hwmon import cdrom
    if not hal:
        signals = cdrom.signals
        print 'Start cdrom monitor'
        cdrom.start()
except ImportError:
    cdrom = None


def hal_failure(reason):
    print 'HAL module start failed:', reason
    if cdrom:
        for sig in cdrom.signals:
            cdrom.signals[sig].connect(hal.signals[sig].emit)
        print 'falling back to plain cdrom module'
        cdrom.start()


if hal and cdrom:
    signals['failed'].connect(hal_failure)