From aab6f2b5d3621d5760145d133a72495ef2ac1f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Fri, 13 Mar 2015 13:02:24 +0000 Subject: Use python3 compatible notation for catching exceptions Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72 --- morphlib/plugins/artifact_inspection_plugin.py | 2 +- morphlib/plugins/cross-bootstrap_plugin.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'morphlib/plugins') diff --git a/morphlib/plugins/artifact_inspection_plugin.py b/morphlib/plugins/artifact_inspection_plugin.py index f1f41b3a..b16f393c 100644 --- a/morphlib/plugins/artifact_inspection_plugin.py +++ b/morphlib/plugins/artifact_inspection_plugin.py @@ -162,7 +162,7 @@ class VersionGuesser(object): version = guesser.guess_version(repo, ref, tree) if version: break - except cliapp.AppException, err: + except cliapp.AppException as err: self.app.status(msg='%(repo)s: Failed to list files in %(ref)s', repo=repo, ref=ref, chatty=True) return version diff --git a/morphlib/plugins/cross-bootstrap_plugin.py b/morphlib/plugins/cross-bootstrap_plugin.py index e1f566c2..79609cb5 100644 --- a/morphlib/plugins/cross-bootstrap_plugin.py +++ b/morphlib/plugins/cross-bootstrap_plugin.py @@ -65,7 +65,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): self.unpack_sources(fs_root) self.write_build_script(fs_root) self.create_tarball(handle, fs_root, system_name) - except BaseException, e: + except BaseException as e: logging.error(traceback.format_exc()) self.app.status(msg='Error while building bootstrap image', error=True) @@ -84,7 +84,7 @@ class BootstrapSystemBuilder(morphlib.builder.BuilderBase): with cache.get(chunk_artifact) as chunk_file: try: morphlib.bins.unpack_binary_from_file(chunk_file, dest) - except BaseException, e: + except BaseException as e: self.app.status( msg='Error unpacking binary chunk %(name)s', name=chunk_artifact.name, -- cgit v1.2.1