File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 28
28
#--
29
29
class EnumOsType ( object ):
30
30
values = [ "Unknown" ,
31
- "Windows" ,
31
+ "Darwin" ,
32
+ "FreeBSD" ,
32
33
"Linux" ,
33
- "Darwin " ]; # OSX
34
+ "Windows " ]
34
35
class __metaclass__ ( type ):
35
36
#++---------------------------------------------------------------------------
36
37
# Details: Fn acts as an enumeration.
@@ -64,11 +65,13 @@ def determine_os_type():
64
65
eOSType = EnumOsType .Unknown ;
65
66
66
67
strOS = sys .platform
67
- if strOS == "win32" :
68
- eOSType = EnumOsType .Windows ;
69
- elif (strOS == "linux" ) or (strOS == "linux2" ):
70
- eOSType = EnumOsType .Linux ;
71
- elif strOS == "darwin" :
72
- eOSType == EnumOsType .Darwin ;
68
+ if strOS == "darwin" :
69
+ eOSType = EnumOsType .Darwin
70
+ elif (strOS .startswith ("freebsd" )):
71
+ eOSType = EnumOsType .FreeBSD
72
+ elif (strOS .startswith ("linux" )):
73
+ eOSType = EnumOsType .Linux
74
+ elif strOS == "win32" :
75
+ eOSType = EnumOsType .Windows
73
76
74
77
return eOSType ;
You can’t perform that action at this time.
0 commit comments