This is an automated email from the ASF dual-hosted git repository. amagyar pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push: new 9ba5622 Fix format string errors in ambari_common.inet_utils (#2487) 9ba5622 is described below commit 9ba56220980ff7e76a41465ca63b092bb54c6f78 Author: David Tucker <da...@tucker.name> AuthorDate: Fri Oct 19 00:44:33 2018 -0700 Fix format string errors in ambari_common.inet_utils (#2487) --- ambari-common/src/main/python/ambari_commons/inet_utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ambari-common/src/main/python/ambari_commons/inet_utils.py b/ambari-common/src/main/python/ambari_commons/inet_utils.py index 0e160c5..0dadcfa 100644 --- a/ambari-common/src/main/python/ambari_commons/inet_utils.py +++ b/ambari-common/src/main/python/ambari_commons/inet_utils.py @@ -125,7 +125,7 @@ def find_range_components(meta): if len(range_comp1) > 1: range_comp2 = range_comp1[0].split(' ') #split away the "bytes" prefix if len(range_comp2) == 0: - raise FatalException(12, 'Malformed Content-Range response header: "{0}".' % hdr_range) + raise FatalException(12, 'Malformed Content-Range response header: "{0}".'.format(hdr_range)) range_comp3 = range_comp2[1].split('-') seek_pos = int(range_comp3[0]) if range_comp1[1] != '*': #'*' == unknown length @@ -146,7 +146,7 @@ def force_download_file(link, destination, chunk_size = 16 * 1024, progress_func if os.path.exists(destination) and not os.path.isfile(destination): #Directory specified as target? Must be a mistake. Bail out, don't assume anything. - err = 'Download target {0} is a directory.' % destination + err = 'Download target {0} is a directory.'.format(destination) raise FatalException(1, err) (dest_path, file_name) = os.path.split(destination) @@ -207,7 +207,7 @@ def force_download_file(link, destination, chunk_size = 16 * 1024, progress_func downloaded_size = os.stat(temp_dest).st_size if downloaded_size != file_size: - err = 'Size of downloaded file {0} is {1} bytes, it is probably damaged or incomplete' % (destination, downloaded_size) + err = 'Size of downloaded file {0} is {1} bytes, it is probably damaged or incomplete'.format(destination, downloaded_size) raise FatalException(1, err) # when download is complete -> mv temp_dest destination