aboutsummaryrefslogtreecommitdiff
path: root/gbp/scripts/import_dsc.py
diff options
context:
space:
mode:
authorGuido G√ľnther <agx@sigxcpu.org>2016-12-26 20:18:22 +0100
committerGuido G√ľnther <agx@sigxcpu.org>2016-12-26 20:18:22 +0100
commit8038a6fe8aff6128dce6ff5423a5df35fa109edd (patch)
treeb62dffedb6febe19f1ef9fa1f94555a70091e3a2 /gbp/scripts/import_dsc.py
parent58271d630fef2b235f4b8971f96bbd166eccca59 (diff)
import-dsc: Improve error message if there is no dsc file
instead of spewing the exception on the console.
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