print(f"WARNING: software='{software}' does not contain a version number.")
return software
+ temp = software
if ";" in software:
- software = software.split(";")[0]
+ temp = software.split(";")[0]
elif "," in software:
- software = software.split(",")[0]
+ temp = software.split(",")[0]
elif " - " in software:
- software = software.split(" - ")[0]
+ temp = software.split(" - ")[0]
# NOISY-DEBUG: print(f"DEBUG: software='{software}'")
version = None
if " " in software:
- version = software.split(" ")[-1]
+ version = temp.split(" ")[-1]
elif "/" in software:
- version = software.split("/")[-1]
+ version = temp.split("/")[-1]
elif "-" in software:
- version = software.split("-")[-1]
+ version = temp.split("-")[-1]
else:
# NOISY-DEBUG: print(f"DEBUG: Was not able to find common seperator, returning untouched software='{software}'")
return software
return software
# NOISY-DEBUG: print(f"DEBUG: Found valid version number: '{version}', removing it ...")
- end = len(software) - len(version) - 1
+ end = len(temp) - len(version) - 1
# NOISY-DEBUG: print(f"DEBUG: end[{type(end)}]={end}")
- software = software[0:end].strip()
+ software = temp[0:end].strip()
if " version" in software:
# NOISY-DEBUG: print(f"DEBUG: software='{software}' contains word ' version'")
software = strip_until(software, " version")