summaryrefslogtreecommitdiff
path: root/gbp/git/repository.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2012-07-02 08:05:06 +0200
committerGuido Günther <agx@sigxcpu.org>2012-07-02 08:53:04 +0200
commite6e0150e07be32b91624b460b67be39b8f6b0ab9 (patch)
treeebf593199d58f8a46d3bbeae3335258c6e264d54 /gbp/git/repository.py
parent92a744e5c8e9751f7336ddaac597ded2a7456d8f (diff)
Make exception syntax consistent
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r--gbp/git/repository.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py
index 4d4e402..09929a8 100644
--- a/gbp/git/repository.py
+++ b/gbp/git/repository.py
@@ -1138,7 +1138,7 @@ class GitRepository(object):
commits, ret = self._git_getoutput('log', args.args)
if ret:
where = " on %s" % paths if paths else ""
- raise GitRepositoryError, ("Error getting commits %s..%s%s" %
+ raise GitRepositoryError("Error getting commits %s..%s%s" %
(since, until, where))
return [ commit.strip() for commit in commits ]
@@ -1391,7 +1391,7 @@ class GitRepository(object):
description += '\n' if description[-1] != '\n' else ''
f.write(description)
return klass(abspath)
- except OSError, err:
+ except OSError as err:
raise GitRepositoryError("Cannot create Git repository at '%s': %s"
% (abspath, err[1]))
return None
@@ -1446,7 +1446,7 @@ class GitRepository(object):
elif name.endswith('.git'):
name = name[:-4]
return klass(os.path.join(abspath, name))
- except OSError, err:
+ except OSError as err:
raise GitRepositoryError("Cannot clone Git repository "
"'%s' to '%s': %s"
% (remote, abspath, err[1]))