summaryrefslogtreecommitdiffstats
path: root/lldb/scripts/utilsOsType.py
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/scripts/utilsOsType.py')
-rw-r--r--lldb/scripts/utilsOsType.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/lldb/scripts/utilsOsType.py b/lldb/scripts/utilsOsType.py
index a2f0563bf89..fe3552e8a5d 100644
--- a/lldb/scripts/utilsOsType.py
+++ b/lldb/scripts/utilsOsType.py
@@ -28,6 +28,7 @@ import sys # Provide system information
#--
if sys.version_info.major >= 3:
from enum import Enum
+
class EnumOsType(Enum):
Unknown = 0
Darwin = 1
@@ -43,13 +44,15 @@ else:
"Linux",
"NetBSD",
"Windows"]
+
class __metaclass__(type):
-#++---------------------------------------------------------------------------
-# Details: Fn acts as an enumeration.
-# Args: vName - (R) Enumeration to match.
-# Returns: Int - Matching enumeration/index.
-# Throws: None.
-#--
+ #++----------------------------------------------------------------
+ # Details: Fn acts as an enumeration.
+ # Args: vName - (R) Enumeration to match.
+ # Returns: Int - Matching enumeration/index.
+ # Throws: None.
+ #--
+
def __getattr__(cls, vName):
return cls.values.index(vName)
@@ -72,6 +75,8 @@ else:
# Returns: EnumOsType - The OS type being used ATM.
# Throws: None.
#--
+
+
def determine_os_type():
eOSType = EnumOsType.Unknown
OpenPOWER on IntegriCloud