@@ -410,13 +410,19 @@ def main(override=None):
410
410
print ("" )
411
411
elif name == "edgedriver" or name == "msedgedriver" :
412
412
if "darwin" in sys_plat or "linux" in sys_plat :
413
- # Was expecting to be on a Windows OS at this point
414
- raise Exception ("Unexpected file format for msedgedriver!" )
415
- expected_contents = (['Driver_Notes/' ,
416
- 'Driver_Notes/credits.html' ,
417
- 'Driver_Notes/LICENSE' ,
418
- 'msedgedriver.exe' ])
419
- if len (contents ) > 4 :
413
+ # Mac / Linux
414
+ expected_contents = (['Driver_Notes/' ,
415
+ 'Driver_Notes/LICENSE' ,
416
+ 'Driver_Notes/credits.html' ,
417
+ 'msedgedriver' ,
418
+ 'libc++.dylib' ])
419
+ else :
420
+ # Windows
421
+ expected_contents = (['Driver_Notes/' ,
422
+ 'Driver_Notes/credits.html' ,
423
+ 'Driver_Notes/LICENSE' ,
424
+ 'msedgedriver.exe' ])
425
+ if len (contents ) > 5 :
420
426
raise Exception ("Unexpected content in EdgeDriver Zip file!" )
421
427
for content in contents :
422
428
if content not in expected_contents :
@@ -430,11 +436,20 @@ def main(override=None):
430
436
# Remove existing version if exists
431
437
str_name = str (f_name )
432
438
new_file = downloads_folder + '/' + str_name
433
- if str_name == "msedgedriver.exe" :
434
- driver_file = str_name
435
- driver_path = new_file
436
- if os .path .exists (new_file ):
437
- os .remove (new_file )
439
+ if "darwin" in sys_plat or "linux" in sys_plat :
440
+ # Mac / Linux
441
+ if str_name == "msedgedriver" :
442
+ driver_file = str_name
443
+ driver_path = new_file
444
+ if os .path .exists (new_file ):
445
+ os .remove (new_file )
446
+ else :
447
+ # Windows
448
+ if str_name == "msedgedriver.exe" :
449
+ driver_file = str_name
450
+ driver_path = new_file
451
+ if os .path .exists (new_file ):
452
+ os .remove (new_file )
438
453
if not driver_file or not driver_path :
439
454
raise Exception ("msedgedriver missing from Zip file!" )
440
455
print ('Extracting %s from %s ...' % (contents , file_name ))
0 commit comments