@@ -188,12 +188,12 @@ def normalize_name(name):
188188
189189
190190def format_size (bytes ):
191- if bytes > 1000 * 1000 :
192- return '%.1fMB' % (bytes / 1000.0 / 1000 )
193- elif bytes > 10 * 1000 :
194- return '%ikB' % (bytes / 1000 )
191+ if bytes > 1000 * 1000 :
192+ return '%.1fMB' % (bytes / 1000.0 / 1000 )
193+ elif bytes > 10 * 1000 :
194+ return '%ikB' % (bytes / 1000 )
195195 elif bytes > 1000 :
196- return '%.1fkB' % (bytes / 1000.0 )
196+ return '%.1fkB' % (bytes / 1000.0 )
197197 else :
198198 return '%ibytes' % bytes
199199
@@ -274,7 +274,7 @@ def make_path_relative(path, rel_to):
274274 while path_parts and rel_to_parts and path_parts [0 ] == rel_to_parts [0 ]:
275275 path_parts .pop (0 )
276276 rel_to_parts .pop (0 )
277- full_parts = ['..' ]* len (rel_to_parts ) + path_parts + [path_filename ]
277+ full_parts = ['..' ] * len (rel_to_parts ) + path_parts + [path_filename ]
278278 if full_parts == ['' ]:
279279 return '.' + os .path .sep
280280 return os .path .sep .join (full_parts )
@@ -540,7 +540,7 @@ def unzip_file(filename, location, flatten=True):
540540 if mode and stat .S_ISREG (mode ) and mode & 0o111 :
541541 # make dest file have execute for user/group/world
542542 # (chmod +x) no-op on windows per python docs
543- os .chmod (fn , (0o777 - current_umask () | 0o111 ))
543+ os .chmod (fn , (0o777 - current_umask () | 0o111 ))
544544 finally :
545545 zipfp .close ()
546546
@@ -615,7 +615,7 @@ def untar_file(filename, location):
615615 if member .mode & 0o111 :
616616 # make dest file have execute for user/group/world
617617 # no-op on windows per python docs
618- os .chmod (path , (0o777 - current_umask () | 0o111 ))
618+ os .chmod (path , (0o777 - current_umask () | 0o111 ))
619619 finally :
620620 tar .close ()
621621
@@ -632,7 +632,7 @@ def cache_download(target_file, temp_location, content_type):
632632 'Storing download in cache at %s' % display_path (target_file )
633633 )
634634 shutil .copyfile (temp_location , target_file )
635- fp = open (target_file + '.content-type' , 'w' )
635+ fp = open (target_file + '.content-type' , 'w' )
636636 fp .write (content_type )
637637 fp .close ()
638638
0 commit comments