diff options
author | Martin Braun <martin.braun@ettus.com> | 2018-03-01 16:19:38 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2018-03-01 16:59:55 -0800 |
commit | 804905c6cf31b5f8e55b21ace365a5b4b2fb23d4 (patch) | |
tree | 7cacfee9484490f3ec7e3d19bf5c157400faf461 /host/utils/uhd_images_downloader.py.in | |
parent | 7e5fffa3cc102d479c2547d70951890b1f012e06 (diff) | |
download | uhd-804905c6cf31b5f8e55b21ace365a5b4b2fb23d4.tar.gz uhd-804905c6cf31b5f8e55b21ace365a5b4b2fb23d4.tar.bz2 uhd-804905c6cf31b5f8e55b21ace365a5b4b2fb23d4.zip |
utils: Increase verbosity on uhd_images_downloader
Diffstat (limited to 'host/utils/uhd_images_downloader.py.in')
-rw-r--r-- | host/utils/uhd_images_downloader.py.in | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in index 9fb660e5a..73a29bad5 100644 --- a/host/utils/uhd_images_downloader.py.in +++ b/host/utils/uhd_images_downloader.py.in @@ -173,7 +173,7 @@ def lookup_urls(regex, manifest, inventory, refetch=False): filename = os.path.basename(target_url) if not refetch and inventory.get(filename, {}).get("repo_hash", "") == target_hash: # We already have this file, we don't need to download it again - log("TRACE", "Selected target already downloaded- skipping.") + log("INFO", "Target {} is up to date.".format(target)) else: # We don't have that exact file, add it to the list selected_targets.append({"repo_hash": target_hash, @@ -272,6 +272,8 @@ def main(): global _LOG_LEVEL log("TRACE", "Default log level: {}".format(_LOG_LEVEL)) _LOG_LEVEL = _LOG_LEVEL - args.verbose + args.quiet + images_dir = args.install_location + log("INFO", "Images destination: {}".format(os.path.abspath(images_dir))) try: # If we're given a path to a manifest file, use it if os.path.exists(args.manifest_location): @@ -325,14 +327,10 @@ def main(): "\n".join("{}".format(item) for item in target_urls) )) else: - log("INFO", "No targets selected. Exiting.") return 0 with TemporaryDirectory() as temp_dir: # Now download all the images archives into a temp directory - images_dir = args.install_location - log("INFO", "Images destination: {}".format(os.path.abspath(images_dir))) - log("INFO", "Starting download. Run with -v to see download progress bars.") for target_info in targets_info: target_hash = target_info.get("repo_hash") target_rel_url = target_info.get("url") @@ -346,7 +344,7 @@ def main(): images_url=full_url, filename=temp_path, buffer_size=args.buffer_size, - print_progress=(_LOG_LEVEL <= _LOG_LEVELS.get("DEBUG", 2)) + print_progress=(_LOG_LEVEL <= _LOG_LEVELS.get("INFO", 3)) ) if downloaded_sha256 != target_sha256: log("ERROR", "Downloaded SHA256 does not match manifest for {}!".format( |