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()
|
||||
child_stdout.close()
|
||||
child_stdin.close()
|
||||
# some distros put n/a in places so remove them
|
||||
pattern = sre.compile(r' n/a', sre.IGNORECASE)
|
||||
output = sre.sub(pattern, '', output)
|
||||
# some distros put n/a in places, so remove those
|
||||
output = output.replace('n/a', '').replace('N/A', '')
|
||||
return output
|
||||
|
||||
# lsb_release executable not available, so parse files
|
||||
|
|
Loading…
Reference in New Issue