mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-29 13:26:30 -04:00
Removed unnecessary s_exit() statements
This commit is contained in:
+7
-11
@@ -447,6 +447,7 @@ def print_info(): # prints help text based on argument
|
|||||||
print(' delete/del remove a device id from the quick-unlock whitelist\n')
|
print(' delete/del remove a device id from the quick-unlock whitelist\n')
|
||||||
else:
|
else:
|
||||||
print('\n\u001b[38;5;9merror: argument (whitelist) only available on server\u001b[0m\n')
|
print('\n\u001b[38;5;9merror: argument (whitelist) only available on server\u001b[0m\n')
|
||||||
|
s_exit(0)
|
||||||
|
|
||||||
|
|
||||||
def no_arg(): # displays a list of entries and gives an option to select one for viewing
|
def no_arg(): # displays a list of entries and gives an option to select one for viewing
|
||||||
@@ -882,7 +883,6 @@ if __name__ == "__main__":
|
|||||||
whitelist_setup()
|
whitelist_setup()
|
||||||
else:
|
else:
|
||||||
print_info()
|
print_info()
|
||||||
s_exit(0)
|
|
||||||
else:
|
else:
|
||||||
print_info()
|
print_info()
|
||||||
elif argument_list[1] == 'add':
|
elif argument_list[1] == 'add':
|
||||||
@@ -895,7 +895,6 @@ if __name__ == "__main__":
|
|||||||
add_folder()
|
add_folder()
|
||||||
else:
|
else:
|
||||||
print_info()
|
print_info()
|
||||||
s_exit(0)
|
|
||||||
elif argument_list[1] == 'edit':
|
elif argument_list[1] == 'edit':
|
||||||
if len(argument_list) == 2:
|
if len(argument_list) == 2:
|
||||||
print_info()
|
print_info()
|
||||||
@@ -908,7 +907,6 @@ if __name__ == "__main__":
|
|||||||
edit()
|
edit()
|
||||||
else:
|
else:
|
||||||
print_info()
|
print_info()
|
||||||
s_exit(0)
|
|
||||||
elif argument_list[1] == 'gen':
|
elif argument_list[1] == 'gen':
|
||||||
gen()
|
gen()
|
||||||
elif argument_list[1] == 'copy':
|
elif argument_list[1] == 'copy':
|
||||||
@@ -931,15 +929,13 @@ if __name__ == "__main__":
|
|||||||
s_exit(1)
|
s_exit(1)
|
||||||
|
|
||||||
# sync if any changes were made
|
# sync if any changes were made
|
||||||
if len(argument_list) > 1 and ssh_error == 0 and \
|
if len(argument_list) > 1 and ssh_error == 0 \
|
||||||
((argument_list[1] == 'sync' or argument_list[1] == '-s' or argument_list[1] == 'gen' or
|
and ((argument_list[1] == 'sync' or argument_list[1] == '-s' or argument_list[1] == 'gen' or
|
||||||
argument_list[1] == 'shear' or argument_list[1] == '-rm') or ((argument_list[1] == 'add'
|
argument_list[1] == 'shear' or argument_list[1] == '-rm') or
|
||||||
or argument_list[1] == 'edit')
|
((argument_list[1] == 'add' or argument_list[1] == 'edit') and len(argument_list) > 2)):
|
||||||
and len(argument_list) > 2)):
|
|
||||||
sync()
|
sync()
|
||||||
|
|
||||||
s_exit(0)
|
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('\n')
|
print('\n')
|
||||||
s_exit(0)
|
|
||||||
|
s_exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user