Browse Source

Make `get_cmd_params()` tollerate commands with no arguments

Michael Hanke 2 years ago
parent
commit
76347d109c
1 changed files with 2 additions and 0 deletions
  1. 2 0
      datalad_gooey/api_utils.py

+ 2 - 0
datalad_gooey/api_utils.py

@@ -28,6 +28,8 @@ def get_cmd_params(cmd: Callable) -> List:
     """
     # lifted from setup_parser_for_interface()
     args, varargs, varkw, defaults = getargspec(cmd, include_kwonlyargs=True)
+    if not args:
+        return []
     return list(
         zip_longest(
             # fuse parameters from the back, to match with their respective