mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-09-05 08:37:14 -04:00
Fixed possibility of attempting to sync from a server installation
Former-commit-id: 4ac82c68470f451635c698a244899140e97640b2 Former-commit-id: 8b1381521016f23d1c53c6f1e23d1851a0aa04f0
This commit is contained in:
+15
-14
@@ -705,28 +705,29 @@ if __name__ == "__main__":
|
|||||||
from stweak import wrapped_entry
|
from stweak import wrapped_entry
|
||||||
wrapped_entry(device_type)
|
wrapped_entry(device_type)
|
||||||
|
|
||||||
|
if arg_count > 0 and success_flag == 0 and arguments[0] != 'sync':
|
||||||
|
if arguments[0] not in ('help', '-h', 'version', '-v', 'license'):
|
||||||
|
extension_runner()
|
||||||
|
else:
|
||||||
|
print_info()
|
||||||
|
elif not ssh_error:
|
||||||
|
if sync_flag:
|
||||||
|
sync()
|
||||||
|
elif (arg_count > 0 and arguments[0] == 'sync') or (arg_count > 1 and arguments[1] == 'shear'):
|
||||||
|
sync('\n')
|
||||||
|
|
||||||
# PORT START ARGS-SERVER
|
# PORT START ARGS-SERVER
|
||||||
# server arguments
|
# server arguments
|
||||||
else:
|
else:
|
||||||
if arg_count < 1:
|
if arg_count == 1 and arguments[0] == 'tweak':
|
||||||
arguments.append('help')
|
|
||||||
print_info()
|
|
||||||
elif arg_count == 1 and arguments[0] == 'tweak':
|
|
||||||
success_flag = True
|
success_flag = True
|
||||||
from stweak import wrapped_entry
|
from stweak import wrapped_entry
|
||||||
wrapped_entry(device_type)
|
wrapped_entry(device_type)
|
||||||
# PORT END ARGS-SERVER
|
|
||||||
|
|
||||||
if arg_count > 0 and success_flag == 0 and arguments[0] != 'sync':
|
|
||||||
if device_type == 'client' and arguments[0] not in ('help', '-h', 'version', '-v', 'license'):
|
|
||||||
extension_runner()
|
|
||||||
else:
|
else:
|
||||||
|
if arg_count < 1:
|
||||||
|
arguments.append('help')
|
||||||
print_info()
|
print_info()
|
||||||
elif not ssh_error:
|
# PORT END ARGS-SERVER
|
||||||
if sync_flag:
|
|
||||||
sync()
|
|
||||||
elif (arg_count > 0 and arguments[0] == 'sync') or (arg_count > 1 and arguments[1] == 'shear'):
|
|
||||||
sync('\n')
|
|
||||||
|
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print('\n')
|
print('\n')
|
||||||
|
|||||||
Reference in New Issue
Block a user