Address issue #96

This commit is contained in:
2Shirt 2019-11-17 14:54:49 -07:00
parent 8b25326b2d
commit f2373edd8e
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -598,7 +598,9 @@ def get_hostname():
"""Get hostname, returns str."""
cmd = ['hostnamectl', '--static']
result = run_program(cmd, check=False, encoding='utf-8', errors='ignore')
return result.stdout.strip()
result = result.stdout.strip()
result = result.replace('.1201.com', '')
return result
def pad_with_dots(s, pad_right=False):