mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 16:47:14 -04:00
Fix for occasional IndexError exceptions with new argument system
This commit is contained in:
@@ -708,14 +708,15 @@ if __name__ == "__main__":
|
|||||||
print_info()
|
print_info()
|
||||||
elif argument_list[0] == 'shear' or argument_list[0] == '-rm':
|
elif argument_list[0] == 'shear' or argument_list[0] == '-rm':
|
||||||
remove_data()
|
remove_data()
|
||||||
else:
|
elif argument_list[0] != 'sync' and argument_list[0] != '-s':
|
||||||
print("\nArgument error! Please run 'sshyp help' for a list of usable commands.\n")
|
print("\nArgument error! Please run 'sshyp help' for a list of usable commands.\n")
|
||||||
s_exit(1)
|
s_exit(1)
|
||||||
|
|
||||||
# sync if any changes were made
|
# sync if any changes were made
|
||||||
if argument_list[0] == 'sync' or argument_list[0] == '-s' or argument_list[0] == 'gen' or argument_list[0] == \
|
if len(argument_list) > 0 and ((argument_list[0] == 'sync' or argument_list[0] == '-s' or argument_list[0] ==
|
||||||
'shear' or argument_list[0] == '-rm' or ((argument_list[0] == 'add' or argument_list[0] == 'edit')
|
'gen' or argument_list[0] == 'shear' or argument_list[0] == '-rm') or
|
||||||
and len(argument_list) != 1):
|
((argument_list[0] == 'add' or argument_list[0] == 'edit') and
|
||||||
|
len(argument_list) > 1)):
|
||||||
sync()
|
sync()
|
||||||
|
|
||||||
s_exit(0)
|
s_exit(0)
|
||||||
|
|||||||
Reference in New Issue
Block a user