Skip to content
Browse files

use sys.platform instead of platform.system

  • Loading branch information...
1 parent 097152d commit db895b08e7e86257a91e7c65c6a8ef689297645a @m0mchil committed Apr 8, 2013
Showing with 6 additions and 7 deletions.
  1. +6 −7 detect.py
View
13 detect.py
@@ -1,8 +1,7 @@
-WINDOWS = LINUX = None
+from sys import platform
-try:
- from platform import system
- WINDOWS = system() == 'Windows'
- LINUX = system() == 'Linux'
-except ImportError:
- pass
+WINDOWS = LINUX = MACOSX = None
+
+WINDOWS = platform.startswith('win')
+LINUX = platform.startswith('linux')
+MACOSX = (platform == 'darwin')

0 comments on commit db895b0

Please sign in to comment.
Something went wrong with that request. Please try again.