mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 12:56:28 -04:00
Fixed failure to pass entry names to extensions from typed arguments
Former-commit-id: 4a2828e1c5f0ea098ccc7c8d8dbef7cf9a8a1964 Former-commit-id: c66bae1cb6cbe49a50a838f96528c3d08cdabf3a
This commit is contained in:
+3
-4
@@ -791,7 +791,7 @@ def remove_data(): # deletes an entry from the server and flags it for local de
|
||||
offline_delete(_entry_name, 'locally')
|
||||
|
||||
|
||||
def extension_runner():
|
||||
def extension_runner(): # checks extension config files for matches to argument, runs extensions
|
||||
from configparser import ConfigParser
|
||||
_output_com, _extension_dir = None, realpath(__file__).rsplit('/', 1)[0] + '/extensions/'
|
||||
for _extension in listdir(_extension_dir):
|
||||
@@ -799,10 +799,9 @@ def extension_runner():
|
||||
_extension_config.read(_extension_dir + _extension)
|
||||
_input_com = _extension_config.get('config', 'input').split()
|
||||
if _input_com == arguments[arg_start:]:
|
||||
_output_com = _extension_config.get('config', 'output').split()
|
||||
if arg_start == 1:
|
||||
_output_com = _extension_config.get('config', 'output').split().insert(0, arguments[0])
|
||||
else:
|
||||
_output_com = _extension_config.get('config', 'output').split()
|
||||
_output_com.append(arguments[0])
|
||||
if _output_com is not None:
|
||||
run(_output_com)
|
||||
s_exit()
|
||||
|
||||
Reference in New Issue
Block a user