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/pkg | |
parent | 92a744e5c8e9751f7336ddaac597ded2a7456d8f (diff) |
Make exception syntax consistent
Diffstat (limited to 'gbp/pkg')
-rw-r--r-- | gbp/pkg/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gbp/pkg/__init__.py b/gbp/pkg/__init__.py index 36f7099..d402f4e 100644 --- a/gbp/pkg/__init__.py +++ b/gbp/pkg/__init__.py @@ -175,13 +175,13 @@ class UpstreamSource(object): and determine the toplevel of the source tree. """ if self.is_dir(): - raise GbpError, "Cannot unpack directory %s" % self.path + raise GbpError("Cannot unpack directory %s" % self.path) if not filters: filters = [] if type(filters) != type([]): - raise GbpError, "Filters must be a list" + raise GbpError("Filters must be a list") self._unpack_archive(dir, filters) self.unpacked = self._unpacked_toplevel(dir) @@ -200,7 +200,7 @@ class UpstreamSource(object): try: gbpc.UnpackZipArchive(self.path, dir)() except gbpc.CommandExecFailed: - raise GbpError, "Unpacking of %s failed" % self.path + raise GbpError("Unpacking of %s failed" % self.path) def _unpacked_toplevel(self, dir): """unpacked archives can contain a leading directory or not""" @@ -236,13 +236,13 @@ class UpstreamSource(object): @rtype: UpstreamSource """ if not self.unpacked: - raise GbpError, "Need an unpacked source tree to pack" + raise GbpError("Need an unpacked source tree to pack") if not filters: filters = [] if type(filters) != type([]): - raise GbpError, "Filters must be a list" + raise GbpError("Filters must be a list") try: unpacked = self.unpacked.rstrip('/') |