diff options
author | Patrick Sisterhen <patrick.sisterhen@ni.com> | 2014-10-15 18:17:29 -0500 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2014-10-16 21:08:01 +0200 |
commit | ab46ea0412acbf97a4f8e37e97e768e46ee8586d (patch) | |
tree | 41ff247b98fe417de43ae33b73026a32644fe8ae /host/utils | |
parent | e906c610cc95c1df58ffd4b05f56153643f38b0b (diff) | |
download | uhd-ab46ea0412acbf97a4f8e37e97e768e46ee8586d.tar.gz uhd-ab46ea0412acbf97a4f8e37e97e768e46ee8586d.tar.bz2 uhd-ab46ea0412acbf97a4f8e37e97e768e46ee8586d.zip |
Adding explicit positional arguments to .format strings for compatibility with older Pythons
Diffstat (limited to 'host/utils')
-rw-r--r-- | host/utils/uhd_images_downloader.py.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/host/utils/uhd_images_downloader.py.in b/host/utils/uhd_images_downloader.py.in index bd4df8c9c..8a0754f49 100644 --- a/host/utils/uhd_images_downloader.py.in +++ b/host/utils/uhd_images_downloader.py.in @@ -222,12 +222,12 @@ def main(): ### Set defaults from env variables if os.environ.get("UHD_IMAGES_DIR") != None and os.environ.get("UHD_IMAGES_DIR") != "": default_images_dir = os.environ.get("UHD_IMAGES_DIR") - print "UHD_IMAGES_DIR environment variable is set.\nDefault install location: {}".format(default_images_dir) + print "UHD_IMAGES_DIR environment variable is set.\nDefault install location: {0}".format(default_images_dir) else: default_images_dir = _DEFAULT_INSTALL_PATH if os.environ.get("UHD_IMAGES_BASE_URL") != None and os.environ.get("UHD_IMAGES_BASE_URL") != "": default_base_url = os.environ.get("UHD_IMAGES_BASE_URL") - print "UHD_IMAGES_BASE_URL environment variable is set.\nDefault base URL: {}".format(default_base_url) + print "UHD_IMAGES_BASE_URL environment variable is set.\nDefault base URL: {0}".format(default_base_url) else: default_base_url = _DEFAULT_BASE_URL @@ -280,7 +280,7 @@ def main(): print "Images filename: %s" % (options.filename) print "Images checksum: %s (%s)" % (options.checksum, _IMAGES_CHECKSUM_TYPE) print "Final install location: %s" % (images_dir) - print "Copying locally: {}".format("Yes" if base_url_is_local else "No") + print "Copying locally: {0}".format("Yes" if base_url_is_local else "No") else: print "Images destination: %s" % (images_dir) @@ -297,8 +297,8 @@ def main(): print "Using temporary directory: %s" % (temp_dir) temp_images_dest = os.path.join(temp_dir, options.filename) if not base_url_is_local: - print "Downloading images from: {}".format(images_url) - print "Downloading images to: {}".format(temp_images_dest) + print "Downloading images from: {0}".format(images_url) + print "Downloading images to: {0}".format(temp_images_dest) (reported_size, downloaded_size) = downloader.download( images_url=images_url, filename=temp_images_dest, @@ -309,7 +309,7 @@ def main(): print "Downloaded %d of %d bytes" % (downloaded_size, reported_size) else: temp_images_dest = os.path.join(options.base_url, options.filename) - print "Copying images from: {}".format(temp_images_dest) + print "Copying images from: {0}".format(temp_images_dest) if not os.path.isfile(temp_images_dest): print "[ERROR] No such file." return 1 |