aboutsummaryrefslogtreecommitdiff
path: root/gbp/scripts/import_dsc.py
diff options
context:
space:
mode:
Diffstat (limited to 'gbp/scripts/import_dsc.py')
-rw-r--r--gbp/scripts/import_dsc.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index a6ec09b..aa88bec 100644
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -59,7 +59,10 @@ def download_source(pkg, dirs, unauth):
gbp.log.info("Downloading '%s' using '%s'..." % (pkg, cmd))
gbpc.RunAtCommand(cmd, opts, shell=False)(dir=dirs['download'])
- dsc = glob.glob(os.path.join(dirs['download'], '*.dsc'))[0]
+ try:
+ dsc = glob.glob(os.path.join(dirs['download'], '*.dsc'))[0]
+ except IndexError:
+ raise GbpError("Did not find a dsc file at %s/" % dirs['download'])
return dsc