diff options
| author | Ed Leafe <ed@leafe.com> | 2010-12-31 04:44:45 -0600 |
|---|---|---|
| committer | Ed Leafe <ed@leafe.com> | 2010-12-31 04:44:45 -0600 |
| commit | b097d5a247f95fac180c3270cb1f613edfa46523 (patch) | |
| tree | 4ffd46ea6988fe915f7fc6278ca82843218012dd /plugins | |
| parent | b5f5ec40bbc6b898ac73444e9a0f0372c92fc12a (diff) | |
| download | nova-b097d5a247f95fac180c3270cb1f613edfa46523.tar.gz nova-b097d5a247f95fac180c3270cb1f613edfa46523.tar.xz nova-b097d5a247f95fac180c3270cb1f613edfa46523.zip | |
Corrected the sloppy import in the xenstore plugin that was copied from other plugins.
Diffstat (limited to 'plugins')
| -rwxr-xr-x | plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py index 3b9d65b85..e0a125170 100755 --- a/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py +++ b/plugins/xenserver/xenapi/etc/xapi.d/plugins/xenstore.py @@ -29,8 +29,8 @@ import subprocess import XenAPIPlugin -from pluginlib_nova import * -configure_logging("xenstore") +import pluginlib_nova as pluginlib +pluginlib.configure_logging("xenstore") def read_record(self, arg_dict): @@ -43,7 +43,7 @@ def read_record(self, arg_dict): cmd = "xenstore-read /local/domain/%(dom_id)s/%(path)s" % arg_dict try: return _run_command(cmd).rstrip("\n") - except PluginError, e: + except pluginlib.PluginError, e: if arg_dict.get("ignore_missing_path", False): cmd = "xenstore-exists /local/domain/%(dom_id)s/%(path)s; echo $?" % arg_dict ret = _run_command(cmd).strip() @@ -76,7 +76,7 @@ def list_records(self, arg_dict): cmd = cmd.rstrip("/") try: recs = _run_command(cmd) - except PluginError, e: + except pluginlib.PluginError, e: if "No such file or directory" in "%s" % e: # Path doesn't exist. return json.dumps({}) @@ -146,7 +146,7 @@ def _run_command(cmd): proc.wait() err = proc.stderr.read() if err: - raise PluginError(err) + raise pluginlib.PluginError(err) return proc.stdout.read() |
