diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/Bcfg2/Client/Tools/YUMng.py | 3 | ||||
-rwxr-xr-x | src/lib/Bcfg2/Server/Lint/Genshi.py | 3 | ||||
-rw-r--r-- | src/lib/Bcfg2/Server/Plugins/Svn2.py | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/YUMng.py b/src/lib/Bcfg2/Client/Tools/YUMng.py index 154676764..244b66cf4 100644 --- a/src/lib/Bcfg2/Client/Tools/YUMng.py +++ b/src/lib/Bcfg2/Client/Tools/YUMng.py @@ -753,7 +753,8 @@ class YUMng(Bcfg2.Client.Tools.PkgTool): else: self.logger.error("Second pass yum install failed.") self.logger.debug(" %s" % restring) - except yum.Errors.YumBaseError, e: + except yum.Errors.YumBaseError: + e = sys.exc_info()[1] self.logger.error("Yum transaction error: %s" % str(e)) self.yb.conf.skip_broken = skipBroken diff --git a/src/lib/Bcfg2/Server/Lint/Genshi.py b/src/lib/Bcfg2/Server/Lint/Genshi.py index 1965f0330..739e829d0 100755 --- a/src/lib/Bcfg2/Server/Lint/Genshi.py +++ b/src/lib/Bcfg2/Server/Lint/Genshi.py @@ -22,6 +22,7 @@ class Genshi(Bcfg2.Server.Lint.ServerPlugin): try: loader.load(sdata.name, cls=genshi.template.NewTextTemplate) - except genshi.template.TemplateSyntaxError, err: + except genshi.template.TemplateSyntaxError: + err = sys.exc_info()[1] self.LintError("genshi-syntax-error", "Genshi syntax error: %s" % err) diff --git a/src/lib/Bcfg2/Server/Plugins/Svn2.py b/src/lib/Bcfg2/Server/Plugins/Svn2.py index 8d79348f8..e4df9574f 100644 --- a/src/lib/Bcfg2/Server/Plugins/Svn2.py +++ b/src/lib/Bcfg2/Server/Plugins/Svn2.py @@ -71,7 +71,8 @@ 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, err: + except Exception: + err = sys.exc_info()[1] # try to be smart about the error we got back details = None if "callback_ssl_server_trust_prompt" in str(err): |