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/bins.py | |
parent | 60aedc8d97679159678e7ebad2f2d81768e9736a (diff) | |
parent | aab6f2b5d3621d5760145d133a72495ef2ac1f25 (diff) | |
download | morph-cd7fa4119a3850541566b7d20d69515256e0b310.tar.gz |
Merge "Use python3 compatible notation for catching exceptions"
Diffstat (limited to 'morphlib/bins.py')
-rw-r--r-- | morphlib/bins.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/morphlib/bins.py b/morphlib/bins.py index 41e271dd..2e8ba0b3 100644 --- a/morphlib/bins.py +++ b/morphlib/bins.py @@ -74,7 +74,7 @@ if sys.version_info < (2, 7, 3): # pragma: no cover else: if sys.platform != "os2emx": os.chown(targetpath, u, g) - except EnvironmentError, e: + except EnvironmentError as e: raise ExtractError("could not change owner") tarfile.TarFile.chown = fixed_chown @@ -186,7 +186,7 @@ def unpack_binary_from_file(f, dirname): # pragma: no cover prepare_extract(tarinfo, targetpath) try: ret = real(tarinfo, targetpath) - except (IOError, OSError), e: + except (IOError, OSError) as e: if e.errno != errno.EEXIST: if e.filename is None: e.filename = targetpath |