Updated info.py

This commit is contained in:
2Shirt 2018-12-27 19:57:39 -07:00
parent 166a293864
commit 097fae866a
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C

View file

@ -181,7 +181,8 @@ def get_shell_path(folder, user='current'):
if folderid: if folderid:
try: try:
path = knownpaths.get_path(folderid, getattr(knownpaths.UserHandle, user)) path = knownpaths.get_path(
folderid, getattr(knownpaths.UserHandle, user))
except PathNotFoundError: except PathNotFoundError:
# Folder not found, ignore and return None # Folder not found, ignore and return None
pass pass
@ -464,7 +465,10 @@ def show_os_name():
# Show all 32-bit installs as an error message # Show all 32-bit installs as an error message
print_error(os_name, timestamp=False) print_error(os_name, timestamp=False)
else: else:
if re.search(r'(preview build|unrecognized|unsupported)', os_name, re.IGNORECASE): if re.search(
r'(preview build|unrecognized|unsupported)',
os_name,
re.IGNORECASE):
print_error(os_name, timestamp=False) print_error(os_name, timestamp=False)
elif re.search(r'outdated', os_name, re.IGNORECASE): elif re.search(r'outdated', os_name, re.IGNORECASE):
print_warning(os_name, timestamp=False) print_warning(os_name, timestamp=False)
@ -518,3 +522,5 @@ def show_user_data_summary(indent=8, width=32):
if __name__ == '__main__': if __name__ == '__main__':
print("This file is not meant to be called directly.") print("This file is not meant to be called directly.")
# vim: sts=2 sw=2 ts=2