aboutsummaryrefslogtreecommitdiffhomepage
path: root/gbp/scripts/import_dscs.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/scripts/import_dscs.py
parent92a744e5c8e9751f7336ddaac597ded2a7456d8f (diff)
Make exception syntax consistent
Diffstat (limited to 'gbp/scripts/import_dscs.py')
-rw-r--r--gbp/scripts/import_dscs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/gbp/scripts/import_dscs.py b/gbp/scripts/import_dscs.py
index 7cc19f3c..32565346 100644
--- a/gbp/scripts/import_dscs.py
+++ b/gbp/scripts/import_dscs.py
@@ -61,7 +61,7 @@ def fetch_snapshots(pkg, downloaddir):
dscs = glob.glob(os.path.join(downloaddir, '*.dsc'))
if not dscs:
- raise GbpError, 'No package downloaded'
+ raise GbpError('No package downloaded')
return [os.path.join(downloaddir, dsc) for dsc in dscs]
@@ -136,7 +136,7 @@ def main(argv):
(clean, out) = repo.is_clean()
if not clean:
gbp.log.err("Repository has uncommitted changes, commit these first: ")
- raise GbpError, out
+ raise GbpError(out)
else:
dirs['pkg'] = dirs['top']
except GitRepositoryError:
@@ -149,7 +149,7 @@ def main(argv):
for dsc in dscs[1:]:
importer.importdsc(dsc)
- except (GbpError, gbpc.CommandExecFailed), err:
+ except (GbpError, gbpc.CommandExecFailed) as err:
if len(err.__str__()):
gbp.log.err(err)
ret = 1