if not options.nofork and not options.debug: drop_tty() drop_stdio() # Ignore SIGHUP, otherwise a serial console closing drops the whole app signal.signal(signal.SIGHUP, signal.SIG_IGN) from virtManager.engine import vmmEngine gtk.window_set_default_icon_name(appname) if options.show and options.uri == None: raise optparse.OptionValueError("can't use --show-* options " "without --connect") engine = vmmEngine() if not options.nodbus: try: managerObj = dbus_config(engine) if managerObj: # yes, we exit completely now - remote service is in charge logging.debug("Connected to already running instance.") show_remote(managerObj, options.show, options.uri, options.uuid) return except: # Something went wrong doing dbus setup, just ignore & carry on logging.exception("Could not get connection to session bus, " "disabling DBus service")
def __init__(self): self._engine = vmmEngine() self._proxy = self._init_dbus()