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