summaryrefslogtreecommitdiff
path: root/morphlib/bins.py
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2015-03-13 13:02:24 +0000
committerJavier Jardón <jjardon@gnome.org>2015-03-16 16:34:55 +0000
commitaab6f2b5d3621d5760145d133a72495ef2ac1f25 (patch)
tree561f7ca9b2ce8fd78fbf425d7b7fc3b7e12adcd5 /morphlib/bins.py
parentdb23e8e6406f98722d2d18bf61b8e85cd99415eb (diff)
downloadmorph-aab6f2b5d3621d5760145d133a72495ef2ac1f25.tar.gz
Use python3 compatible notation for catching exceptions
Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72
Diffstat (limited to 'morphlib/bins.py')
-rw-r--r--morphlib/bins.py4
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