diff options
| author | 2019-11-20 12:03:02 +0000 | |
|---|---|---|
| committer | 2019-11-20 12:03:02 +0000 | |
| commit | 050bfd29f7f3746051f8de5094bc7930cc01290f (patch) | |
| tree | efa98959d12608a23e3419915fd5beb3455b89dd /modules | |
| parent | show error on unknown !alias subcommand (diff) | |
| signature | ||
args_split shouldn't be [""] when `args` is empty
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/commands/__init__.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/modules/commands/__init__.py b/modules/commands/__init__.py index 9048fb8d..112a85b0 100644 --- a/modules/commands/__init__.py +++ b/modules/commands/__init__.py @@ -102,11 +102,12 @@ class Module(ModuleManager.BaseModule): hook = potential_hook - argparse = hook.get_kwarg("argparse", "plain") - if argparse == "shlex": - args_split = shlex.split(args) - elif argparse == "plain": - args_split = args.split(" ") + if args: + argparse = hook.get_kwarg("argparse", "plain") + if argparse == "shlex": + args_split = shlex.split(args) + elif argparse == "plain": + args_split = args.split(" ") break |
