def handle_event(a, b): if daemon is not None: if daemon.negotiator is not None: daemon.negotiator.stop() if daemon.discoverer is not None: daemon.discoverer.stop() event.clear()
def handle_event(a, b): print 'handle event' if command is not None: print 'command' if command.discoverer is not None: print 'discoverer' command.discoverer.stop() event.clear()