summaryrefslogtreecommitdiffstats
path: root/tests/basic.py
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-06-23 15:40:48 -0600
committerEric Blake <eblake@redhat.com>2011-06-24 08:41:25 -0600
commit9fd3a1ba478cce099d505280759d288a52e64f9e (patch)
tree772ea0058a15b8a062c6bbc7434468d5c8ef2bf3 /tests/basic.py
parentb5c2428444e6e5fd153c6ac11d15edb4b3f0104e (diff)
Revert "Add new API virDomainBlockPull* to headers"
This reverts commit 7d56a16d036d9aa7292e10e884c129742036f8a7. Conflicts: python/generator.py src/libvirt_public.syms
Diffstat (limited to 'tests/basic.py')
0 files changed, 0 insertions, 0 deletions
n> Version Type Email Description """ from abrt_utils import _, log, log1, log2 from ConfBackend import getCurrentConfBackend, ConfBackendInitError class PluginSettings(dict): def __init__(self): dict.__init__(self) self.client_side_conf = None try: self.client_side_conf = getCurrentConfBackend() except ConfBackendInitError, e: print e def check(self): # if present, these should be non-empty for key in ["Password", "Login"]: if key in self.keys(): if not self[key]: # some of the required keys are missing return False # settings are OK return True def load_daemon_settings(self, name, daemon_settings): # load settings from daemon for key in daemon_settings.keys(): self[str(key)] = str(daemon_settings[key]) if self.client_side_conf: # FIXME: this fails when gk-authoriaztion fails # we need to show a dialog to user and let him know # for now just silently ignore it to avoid rhbz#559342 settings = {} try: settings = self.client_side_conf.load(name) except Exception, e: print e # overwrite daemon data with user setting for key in settings.keys(): # only rewrite keys which exist in plugin's keys. # e.g. we don't want a password field for logger plugin if key in daemon_settings.keys(): self[str(key)] = str(settings[key]) def save_on_client_side(self, name): if self.client_side_conf: self.client_side_conf.save(name, self) class PluginInfo(): """Class to represent common plugin info""" types = {"":_("Not loaded plugins"), "Analyzer":_("Analyzer plugins"), "Action":_("Action plugins"), "Reporter":_("Reporter plugins"), "Database":_("Database plugins")} keys = ["WWW", "Name", "Enabled", "GTKBuilder", "Version", "Type", "Email", "Description"] def __init__(self): self.WWW = None self.Name = None