Skip to content

Commit

Permalink
Code optimisation
Browse files Browse the repository at this point in the history
  • Loading branch information
mbusb committed Feb 1, 2014
1 parent 2161e02 commit b7fc56e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions detect_iso.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@


class AppGui(QtGui.QDialog, Ui_Dialog):

def detect_iso(self, iso_cfg_ext_dir):

if sys.platform.startswith("linux") or platform.system() == "Windows":
for path, subdirs, files in os.walk(iso_cfg_ext_dir):
for name in files:
Expand Down Expand Up @@ -41,9 +39,12 @@ def detect_iso(self, iso_cfg_ext_dir):
return "redhat"
elif re.search(r'suse', string, re.I):
return "suse"
elif re.search(r'opensuse', string, re.I): # or re.search(r'config.isoclient', var.iso_file_content, re.I):
elif re.search(r'opensuse', string,
re.I): # or re.search(r'config.isoclient', var.iso_file_content, re.I):
return "opensuse"
elif re.search(r'slitaz|ophcrack|tinycore|rescue.cpi|xpud|untangle|4mlinux|partition wizard|riplinux|lebel dummy', string, re.I):
elif re.search(
r'slitaz|ophcrack|tinycore|rescue.cpi|xpud|untangle|4mlinux|partition wizard|riplinux|lebel dummy',
string, re.I):
return "slitaz"
elif re.search(r'systemrescuecd', string, re.I):
return "systemrescuecd"
Expand Down

0 comments on commit b7fc56e

Please sign in to comment.