diff options
author | Sol Jerome <sol.jerome@gmail.com> | 2011-07-21 10:44:06 -0500 |
---|---|---|
committer | Sol Jerome <sol.jerome@gmail.com> | 2011-07-21 10:44:06 -0500 |
commit | 52f9abbc8171a441a3f85108cc51a1143531c92c (patch) | |
tree | 70663c87724c229828ea201bdb584f5b72fc5930 /src/lib/Server/Admin | |
parent | 494dea763857f784fb789243bda569c5bec0f10a (diff) | |
download | bcfg2-52f9abbc8171a441a3f85108cc51a1143531c92c.tar.gz bcfg2-52f9abbc8171a441a3f85108cc51a1143531c92c.tar.bz2 bcfg2-52f9abbc8171a441a3f85108cc51a1143531c92c.zip |
bcfg2-admin: Revert some changes that are not py3k compatible
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'src/lib/Server/Admin')
-rw-r--r-- | src/lib/Server/Admin/Reports.py | 5 | ||||
-rw-r--r-- | src/lib/Server/Admin/Xcmd.py | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/Server/Admin/Reports.py b/src/lib/Server/Admin/Reports.py index b4c3b5fcd..3f25f11af 100644 --- a/src/lib/Server/Admin/Reports.py +++ b/src/lib/Server/Admin/Reports.py @@ -28,8 +28,9 @@ import django.core.management # FIXME - settings file uses a hardcoded path for /etc/bcfg2.conf try: import Bcfg2.Server.Reports.settings -except Exception, err: - sys.stderr.write("Failed to load configuration settings. %s\n" % err) +except Exception: + e = sys.exc_info()[1] + sys.stderr.write("Failed to load configuration settings. %s\n" % e) raise SystemExit(1) project_directory = os.path.dirname(Bcfg2.Server.Reports.settings.__file__) diff --git a/src/lib/Server/Admin/Xcmd.py b/src/lib/Server/Admin/Xcmd.py index 6147139fb..8faf68368 100644 --- a/src/lib/Server/Admin/Xcmd.py +++ b/src/lib/Server/Admin/Xcmd.py @@ -1,3 +1,5 @@ +import sys + import Bcfg2.Options import Bcfg2.Proxy import Bcfg2.Server.Admin @@ -40,7 +42,8 @@ class Xcmd(Bcfg2.Server.Admin.Mode): args = tuple(setup['args'][1:]) try: data = getattr(proxy, cmd)(*args) - except xmlrpclib.Fault, flt: + except xmlrpclib.Fault: + flt = sys.exc_info()[1] if flt.faultCode == 7: print("Unknown method %s" % cmd) return |