summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorRaul Cuza <raulcuza@gmail.com>2011-12-10 23:26:19 -0500
committerRaul Cuza <raulcuza@gmail.com>2011-12-10 23:26:19 -0500
commit042c1e10bdf66e6c9b54c88a49200d4f2dbff683 (patch)
tree3940d63585eb857f8f5454e3a0ab018fd369358d /src/lib
parent4310284f6df01caf1b686c9bac8955364a895755 (diff)
downloadbcfg2-042c1e10bdf66e6c9b54c88a49200d4f2dbff683.tar.gz
bcfg2-042c1e10bdf66e6c9b54c88a49200d4f2dbff683.tar.bz2
bcfg2-042c1e10bdf66e6c9b54c88a49200d4f2dbff683.zip
Revert "Correct syntax for try/except statements."
This commit is not compatable with Python 2.4 and below. Our goal is to support for the foreseeable future 2.4+ for Bcfg2 server and 2.3+ for Bcfg2 client. This reverts commit 4310284f6df01caf1b686c9bac8955364a895755.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Client/Tools/YUMng.py2
-rwxr-xr-xsrc/lib/Server/Lint/Genshi.py2
-rw-r--r--src/lib/Server/Plugins/FileProbes.py2
-rw-r--r--src/lib/Server/Plugins/Svn2.py4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index e296561bf..a018e68fb 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -742,7 +742,7 @@ class YUMng(Bcfg2.Client.Tools.PkgTool):
else:
self.logger.error("Second pass yum install failed.")
self.logger.debug(" %s" % restring)
- except yum.Errors.YumBaseError as e:
+ except yum.Errors.YumBaseError, e:
self.logger.error("Yum transaction error: %s" % str(e))
self.yb.conf.skip_broken = skipBroken
diff --git a/src/lib/Server/Lint/Genshi.py b/src/lib/Server/Lint/Genshi.py
index ceb7e0bcf..552c495b2 100755
--- a/src/lib/Server/Lint/Genshi.py
+++ b/src/lib/Server/Lint/Genshi.py
@@ -22,6 +22,6 @@ class Genshi(Bcfg2.Server.Lint.ServerPlugin):
try:
loader.load(sdata.name,
cls=genshi.template.NewTextTemplate)
- except genshi.template.TemplateSyntaxError as err:
+ except genshi.template.TemplateSyntaxError, err:
self.LintError("genshi-syntax-error",
"Genshi syntax error: %s" % err)
diff --git a/src/lib/Server/Plugins/FileProbes.py b/src/lib/Server/Plugins/FileProbes.py
index 5d3c35e5f..2d64c3343 100644
--- a/src/lib/Server/Plugins/FileProbes.py
+++ b/src/lib/Server/Plugins/FileProbes.py
@@ -137,7 +137,7 @@ class FileProbes(Bcfg2.Server.Plugin.Plugin,
self.logger.info("Writing new probed file %s" % fileloc)
try:
os.makedirs(os.path.dirname(fileloc))
- except OSError as err:
+ except OSError, err:
if err.errno == errno.EEXIST:
pass
else:
diff --git a/src/lib/Server/Plugins/Svn2.py b/src/lib/Server/Plugins/Svn2.py
index e189748b1..b8a8e6b7e 100644
--- a/src/lib/Server/Plugins/Svn2.py
+++ b/src/lib/Server/Plugins/Svn2.py
@@ -72,7 +72,7 @@ class Svn2(Bcfg2.Server.Plugin.Plugin,
self.revision = self.client.update(self.datastore, recurse=True)[0]
self.logger.info("Svn2: Commited changes. At %s" %
self.revision.number)
- except Exception as err:
+ except Exception, err:
# try to be smart about the error we got back
details = None
if "callback_ssl_server_trust_prompt" in str(err):
@@ -92,7 +92,7 @@ class Svn2(Bcfg2.Server.Plugin.Plugin,
try:
old_revision = self.revision.number
self.revision = self.client.update(self.datastore, recurse=True)[0]
- except Exception as err:
+ except Exception, err:
# try to be smart about the error we got back
details = None
if "callback_ssl_server_trust_prompt" in str(err):