def __init__(self): Plugin.__init__(self)
def __init__(self): Plugin.__init__(self) self.num1 = self.num2 = None self.description = "" self.cleanup = "number" self.userdata = {}
self.ack() def PLUGINEND(self, headers, body): logging.info("PLUGINEND") self.ack() if "DISABLE_SNAPPER_ZYPP_PLUGIN" in environ: logging.info("$DISABLE_SNAPPER_ZYPP_PLUGIN is set - disabling snapper-zypp-plugin") # a dummy Plugin is needed plugin = Plugin() plugin.main() else: config = Config() try: bus = SystemBus() snapper = Interface(bus.get_object('org.opensuse.Snapper', '/org/opensuse/Snapper'), dbus_interface='org.opensuse.Snapper') except DBusException as e: logging.error("connect to snapperd failed:") logging.error(" %s", e) sys.exit(1)
self.ack() def PLUGINEND(self, headers, body): logging.info("PLUGINEND") logging.info("Uploading Package Profile") try: self.upload_package_profile() except: logging.error("Unable to upload Package Profile") self.ack() if "DISABLE_KATELLO_ZYPP_PLUGIN" in environ: logging.info( "$DISABLE_KATELLO_ZYPP_PLUGIN is set - disabling katello-zypp-plugin") # As the plugin is disabled, we are adding a dummy # Plugin so that zypper still works. plugin = Plugin() plugin.main() else: plugin = KatelloZyppPlugin() plugin.main()