diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-07-02 08:05:06 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-07-02 08:53:04 +0200 |
commit | e6e0150e07be32b91624b460b67be39b8f6b0ab9 (patch) | |
tree | ebf593199d58f8a46d3bbeae3335258c6e264d54 /gbp/git | |
parent | 92a744e5c8e9751f7336ddaac597ded2a7456d8f (diff) | |
download | git-buildpackage-e6e0150e07be32b91624b460b67be39b8f6b0ab9.tar.gz git-buildpackage-e6e0150e07be32b91624b460b67be39b8f6b0ab9.tar.bz2 git-buildpackage-e6e0150e07be32b91624b460b67be39b8f6b0ab9.zip |
Make exception syntax consistent
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 4d4e402b..09929a83 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])) |