diff --git a/src/python/jw/pkg/lib/App.py b/src/python/jw/pkg/lib/App.py index b106b216..276816b2 100644 --- a/src/python/jw/pkg/lib/App.py +++ b/src/python/jw/pkg/lib/App.py @@ -318,11 +318,11 @@ class App: # export # want to do something else, for instance if you don't have sub-commands, # or if want to do anything before and / or after the subcommands. async def _run(self, args: Namespace) -> None | int: - if not hasattr(self.__args, 'func'): + if not hasattr(args, 'func'): self.__parser.print_help() return None # Run sub-command. Overwrite if you want to do anything before or after - return cast('None | int', await self.args.func(args)) + return cast('None | int', await args.func(args)) def call_async(self, awaitable: Awaitable[T], timeout: float | None = None) -> T: return self.async_runner.call(awaitable, timeout)