47
47
elif __file__ :
48
48
current_dir = os .path .dirname (os .path .realpath (unicode (__file__ )))
49
49
50
- # current_dir = os.path.dirname(os.path.realpath(unicode(__file__)))
51
50
dist_dir = current_dir + "/dist/"
52
51
53
52
@@ -108,7 +107,7 @@ def verify_files(filename, destination, rename_to):
108
107
for i , zipped_file in enumerate (archive .namelist (), 1 ):
109
108
local_path = os .path .join (extracted_dir_path , zipped_file .replace (first_dir , rename_to , 1 ))
110
109
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 } ' )
112
111
print (f"Verification failed; aborted in { format_time (time .time () - t1 )} " )
113
112
return False
114
113
print_verification_progress (total_files , i , t1 )
@@ -123,7 +122,7 @@ def verify_files(filename, destination, rename_to):
123
122
for i , zipped_file in enumerate (archive .getnames (), 1 ):
124
123
local_path = os .path .join (extracted_dir_path , zipped_file .replace (first_dir , rename_to , 1 ))
125
124
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 } ' )
127
126
print (f"Verification failed; aborted in { format_time (time .time () - t1 )} " )
128
127
return False
129
128
print_verification_progress (total_files , i , t1 )
@@ -148,8 +147,9 @@ def verify_files(filename, destination, rename_to):
148
147
else :
149
148
raise NotImplementedError ("Unsupported archive type" )
150
149
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
+
153
153
return True
154
154
155
155
@@ -428,8 +428,8 @@ def identify_platform():
428
428
if not get_tool (tool , force_download , force_extract ):
429
429
if verbose :
430
430
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 ):
434
432
print (f"Tool { tool ['archiveFileName' ]} was corrupted, but re-downloading did not help!\n " )
433
+ sys .exit (1 )
434
+
435
435
print ("Platform Tools Installed" )
0 commit comments