patch ez_setup_1_4_2.py to handle KeyboardInterrupt & SystemExit correctly
Such exceptions need to be handled separately when catching the generic Exception class under Python 2.4 or they get gobbled up by the generic exception handling.
This commit is contained in:
parent
ac23dfbbd7
commit
96ae433af8
|
@ -184,6 +184,8 @@ def has_powershell():
|
|||
try:
|
||||
try:
|
||||
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except Exception:
|
||||
return False
|
||||
finally:
|
||||
|
@ -202,6 +204,8 @@ def has_curl():
|
|||
try:
|
||||
try:
|
||||
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except Exception:
|
||||
return False
|
||||
finally:
|
||||
|
@ -220,6 +224,8 @@ def has_wget():
|
|||
try:
|
||||
try:
|
||||
subprocess.check_call(cmd, stdout=devnull, stderr=devnull)
|
||||
except (KeyboardInterrupt, SystemExit):
|
||||
raise
|
||||
except Exception:
|
||||
return False
|
||||
finally:
|
||||
|
|
Loading…
Reference in New Issue