if (xml_file is None) :
xml_file_name = "config.xml"
if os.path.exists("/proc/version"):
- data = open("/proc/version").readline()
- res = re.search(r'Red\s+Hat\s+\w+(\s+)?(\d[.]\d)', data)
+ data = open("/etc/redhat-release").readline()
+ res = re.search(r'Red\s+Hat\s+Linux\s+release\s+([\d.]*)', data)
if res is not None:
- num = re.sub("[.]", "_", (res.groups())[1])
+ num = re.sub("[.]", "_", (res.groups())[0])
filename = "config_RedHat" + num+ ".xml"
if (os.path.exists(cur_dir + filename)):
xml_file_name = filename