Fixes on_windows() method when running under OSX

on_windows() checks platform.system().lower() == 'win'
However, under OSX the returned string is 'Darwin', matching 'win' ;)
According to https://docs.python.org/2/library/platform.html,
for Windows systems it should return 'Windows'.

I just changed the comparison against 'Win' w/o calling lower().
Hopefully it works well on all Windows.
It does work well on OSX :P
pull/12/head
asolino 9 years ago
parent b08d5357dc
commit e6b7be52f7

@ -1078,7 +1078,7 @@ class TimeoutError(Exception):
pass
def on_windows():
return 'win' in system().lower()
return 'Win' in system()
def ignore_ctrlc():
if on_windows():

Loading…
Cancel
Save