overkill to use sre for just replace
This commit is contained in:
parent
ef6ead5d84
commit
1dc069f237
|
@ -669,9 +669,8 @@ def get_os_info():
|
||||||
output = temp_failure_retry(child_stdout.readline).strip()
|
output = temp_failure_retry(child_stdout.readline).strip()
|
||||||
child_stdout.close()
|
child_stdout.close()
|
||||||
child_stdin.close()
|
child_stdin.close()
|
||||||
# some distros put n/a in places so remove them
|
# some distros put n/a in places, so remove those
|
||||||
pattern = sre.compile(r' n/a', sre.IGNORECASE)
|
output = output.replace('n/a', '').replace('N/A', '')
|
||||||
output = sre.sub(pattern, '', output)
|
|
||||||
return output
|
return output
|
||||||
|
|
||||||
# lsb_release executable not available, so parse files
|
# lsb_release executable not available, so parse files
|
||||||
|
|
Loading…
Reference in New Issue