summaryrefslogtreecommitdiffstats
path: root/source-builder/sb/download.py
diff options
context:
space:
mode:
authorChris Johns <chrisj@rtems.org>2013-04-29 08:58:01 +1000
committerChris Johns <chrisj@rtems.org>2013-04-29 08:58:01 +1000
commit0ed876c0a94950876040c24a8802287015a52310 (patch)
tree5ebb1707e7b12006e698f837851991bdf2e29adf /source-builder/sb/download.py
parentRemove the .cfg. Not needed. (diff)
downloadrtems-source-builder-0ed876c0a94950876040c24a8802287015a52310.tar.bz2
Do not run any download type functions if performing a dry-run.
Diffstat (limited to 'source-builder/sb/download.py')
-rw-r--r--source-builder/sb/download.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/source-builder/sb/download.py b/source-builder/sb/download.py
index 37344a1..0aadb80 100644
--- a/source-builder/sb/download.py
+++ b/source-builder/sb/download.py
@@ -313,10 +313,10 @@ def get_file(url, local, opts, config):
urls.append(urlparse.urljoin(base, url_file))
urls.append(url)
log.trace('_url: %s -> %s' % (','.join(urls), local))
- for url in urls:
- for dl in downloaders:
- if url.startswith(dl):
- if downloaders[dl](url, local, config, opts):
- return
if not opts.dry_run():
+ for url in urls:
+ for dl in downloaders:
+ if url.startswith(dl):
+ if downloaders[dl](url, local, config, opts):
+ return
raise error.general('downloading %s: all paths have failed, giving up' % (url))