4747elif __file__ :
4848 current_dir = os .path .dirname (os .path .realpath (unicode (__file__ )))
4949
50- # current_dir = os.path.dirname(os.path.realpath(unicode(__file__)))
5150dist_dir = current_dir + "/dist/"
5251
5352
@@ -108,7 +107,7 @@ def verify_files(filename, destination, rename_to):
108107 for i , zipped_file in enumerate (archive .namelist (), 1 ):
109108 local_path = os .path .join (extracted_dir_path , zipped_file .replace (first_dir , rename_to , 1 ))
110109 if not os .path .exists (local_path ):
111- # print(f'\nMissing {zipped_file} on location: {extracted_dir_path}')
110+ print (f'\n Missing { zipped_file } on location: { extracted_dir_path } ' )
112111 print (f"Verification failed; aborted in { format_time (time .time () - t1 )} " )
113112 return False
114113 print_verification_progress (total_files , i , t1 )
@@ -123,7 +122,7 @@ def verify_files(filename, destination, rename_to):
123122 for i , zipped_file in enumerate (archive .getnames (), 1 ):
124123 local_path = os .path .join (extracted_dir_path , zipped_file .replace (first_dir , rename_to , 1 ))
125124 if not os .path .exists (local_path ):
126- # print(f'\nMissing {zipped_file} on location: {extracted_dir_path}')
125+ print (f'\n Missing { zipped_file } on location: { extracted_dir_path } ' )
127126 print (f"Verification failed; aborted in { format_time (time .time () - t1 )} " )
128127 return False
129128 print_verification_progress (total_files , i , t1 )
@@ -148,8 +147,9 @@ def verify_files(filename, destination, rename_to):
148147 else :
149148 raise NotImplementedError ("Unsupported archive type" )
150149
151- # if(verbose):
152- # print(f"\nVerification passed; completed in {format_time(time.time() - t1)}")
150+ if (verbose ):
151+ print (f"\n Verification passed; completed in { format_time (time .time () - t1 )} " )
152+
153153 return True
154154
155155
@@ -428,8 +428,8 @@ def identify_platform():
428428 if not get_tool (tool , force_download , force_extract ):
429429 if verbose :
430430 print (f"Tool { tool ['archiveFileName' ]} was corrupted. Re-downloading...\n " )
431- if not get_tool (
432- tool , True , force_extract
433- ): # Corrupted file was renamed, will not be found and will be re-downloaded
431+ if not get_tool (tool , True , force_extract ):
434432 print (f"Tool { tool ['archiveFileName' ]} was corrupted, but re-downloading did not help!\n " )
433+ sys .exit (1 )
434+
435435 print ("Platform Tools Installed" )
0 commit comments