aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-12-28 18:34:23 +0100
committerGuido Günther <agx@sigxcpu.org>2016-12-28 18:34:23 +0100
commit5cc490ebffb1718bb21873e77587b842f16aa1c0 (patch)
treeec23e1bfbc269880eb83acbf4e9a246ffebe5710
parent9ecb5a4eed538b6240630ed66b68c45f5b1b08e6 (diff)
import_dsc: fix options.download fallback
-rw-r--r--gbp/scripts/import_dsc.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gbp/scripts/import_dsc.py b/gbp/scripts/import_dsc.py
index aa88bec8..cfeecace 100644
--- a/gbp/scripts/import_dsc.py
+++ b/gbp/scripts/import_dsc.py
@@ -308,7 +308,7 @@ def is_download(pkg):
"""
if pkg.startswith('file://'):
return (False, pkg[len('file://'):])
- if pkg.startswith('apt://'):
+ elif pkg.startswith('apt://'):
return (True, pkg[len('apt://'):])
elif re.match("[a-z]{1,5}://", pkg):
return (True, pkg)
@@ -330,7 +330,9 @@ def parse_all(argv):
gbp.log.err("Need to give exactly one package to import. Try --help.")
return None, None, None
- (options.download, pkg) = is_download(pkg) or options.download
+ download, pkg = is_download(pkg)
+ # honor options.download until removed
+ options.download = download or options.download
return options, pkg, target