You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"This Excption is raised if the current operating enviornment is unknown"
102
102
pass
103
-
103
+
104
104
classDistribution:
105
105
def__init__(self):
106
106
self.distro="Unknown"
@@ -110,11 +110,15 @@ def __init__(self):
110
110
self.distro="Fedora"
111
111
elifos.path.exists("/etc/redhat-release"):
112
112
version=open("/etc/redhat-release").readline()
113
-
ifversion.find("Red Hat Enterprise Linux Server release 6") !=-1orversion.find("Scientific Linux release 6") !=-1orversion.find("CentOS Linux release 6") !=-1orversion.find("CentOS release 6.") !=-1:
113
+
if (version.find("Red Hat Enterprise Linux Server release 6") !=-1orversion.find("Scientific Linux release 6") !=-1or
114
+
version.find("CentOS Linux release 6") !=-1orversion.find("CentOS release 6.") !=-1):
114
115
self.distro="RHEL6"
115
-
elifversion.find("Red Hat Enterprise Linux Server release 7") !=-1orversion.find("Scientific Linux release 7") !=-1orversion.find("CentOS Linux release 7") !=-1orversion.find("CentOS release 7.") !=-1:
116
+
elif (version.find("Red Hat Enterprise Linux Server release 7") !=-1orversion.find("Scientific Linux release 7") !=-1or
117
+
version.find("CentOS Linux release 7") !=-1orversion.find("CentOS release 7.") !=-1):
116
118
self.distro="RHEL7"
117
-
elifversion.find("Red Hat Enterprise Linux Server release 8") !=-1orversion.find("Scientific Linux release 8") !=-1orversion.find("CentOS Linux release 8") !=-1orversion.find("CentOS release 8.") !=-1:
119
+
elif (version.find("Red Hat Enterprise Linux Server release 8") !=-1orversion.find("Scientific Linux release 8") !=-1or
120
+
version.find("CentOS Linux release 8") !=-1orversion.find("CentOS release 8.") !=-1or
0 commit comments