args_split shouldn't be [""] when args is empty

This commit is contained in:
jesopo 2019-11-20 12:03:02 +00:00
parent cb111f0c93
commit 050bfd29f7

View file

@ -102,11 +102,12 @@ class Module(ModuleManager.BaseModule):
hook = potential_hook hook = potential_hook
argparse = hook.get_kwarg("argparse", "plain") if args:
if argparse == "shlex": argparse = hook.get_kwarg("argparse", "plain")
args_split = shlex.split(args) if argparse == "shlex":
elif argparse == "plain": args_split = shlex.split(args)
args_split = args.split(" ") elif argparse == "plain":
args_split = args.split(" ")
break break