diff options
author | Javier Jardón <jjardon@gnome.org> | 2015-03-17 11:09:44 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@baserock.org> | 2015-03-17 11:09:44 +0000 |
commit | cd7fa4119a3850541566b7d20d69515256e0b310 (patch) | |
tree | b8986b02d566f125a59ae2b3b610ead7d3f87e37 /morphlib/builder.py | |
parent | 60aedc8d97679159678e7ebad2f2d81768e9736a (diff) | |
parent | aab6f2b5d3621d5760145d133a72495ef2ac1f25 (diff) | |
download | morph-cd7fa4119a3850541566b7d20d69515256e0b310.tar.gz |
Merge "Use python3 compatible notation for catching exceptions"
Diffstat (limited to 'morphlib/builder.py')
-rw-r--r-- | morphlib/builder.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/morphlib/builder.py b/morphlib/builder.py index 94eeacb8..04ebd149 100644 --- a/morphlib/builder.py +++ b/morphlib/builder.py @@ -289,7 +289,7 @@ class ChunkBuilder(BuilderBase): self.create_devices(destdir) os.rename(temppath, logpath) - except BaseException, e: + except BaseException as e: logging.error('Caught exception: %s' % str(e)) logging.info('Cleaning up staging area') self.staging_area.chroot_close() @@ -375,7 +375,7 @@ class ChunkBuilder(BuilderBase): if stdout: stdout.flush() - except cliapp.AppException, e: + except cliapp.AppException as e: if not stdout: with open(logfilepath, 'r') as log: self.app.output.write("%s failed\n" % step) @@ -656,7 +656,7 @@ class SystemBuilder(BuilderBase): # pragma: no cover msg = error_message_for_containerised_commandline( argv, err, container_config) raise cliapp.AppException(msg) - except BaseException, e: + except BaseException as e: self.app.status( msg='Error while running system integration commands', error=True) |