mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-02 23:27:17 -04:00
Properly handled exception for unfinished configuration files
This commit is contained in:
@@ -652,7 +652,7 @@ if __name__ == "__main__":
|
|||||||
directory = str(ssh_info[3].replace('\n', ''))
|
directory = str(ssh_info[3].replace('\n', ''))
|
||||||
directory_ssh = '/home/' + username_ssh + '/.password-pasture/'
|
directory_ssh = '/home/' + username_ssh + '/.password-pasture/'
|
||||||
client_device_name = listdir(path.expanduser('~/.config/sshyp/devices'))[0]
|
client_device_name = listdir(path.expanduser('~/.config/sshyp/devices'))[0]
|
||||||
except FileNotFoundError:
|
except (FileNotFoundError, IndexError):
|
||||||
if device_type.lower() != 's':
|
if device_type.lower() != 's':
|
||||||
print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
|
||||||
print("not all necessary configuration files are present - please run 'sshyp tweak'")
|
print("not all necessary configuration files are present - please run 'sshyp tweak'")
|
||||||
|
|||||||
Reference in New Issue
Block a user