mirror of
https://git.zavage.net/Zavage-Software/app_skellington.git
synced 2024-12-21 14:19:21 -07:00
changed names for more informative tracebacks
This commit is contained in:
parent
56131511cb
commit
64ee90066d
@ -110,7 +110,7 @@ def register_class_as_commands(app, submenu, cls_object):
|
||||
|
||||
def create_func(constructor, cls_method):
|
||||
def func(*args, **kwargs):
|
||||
obj = constructor()
|
||||
return cls_method(obj, *args, **kwargs)
|
||||
cmd_class_instance = constructor()
|
||||
return cls_method(cmd_class_instance, *args, **kwargs)
|
||||
return func
|
||||
|
||||
|
@ -125,10 +125,10 @@ class ApplicationContainer:
|
||||
model_constructor: reference to object constructor.
|
||||
"""
|
||||
dependency_names = args
|
||||
dep_references = []
|
||||
dependencies = []
|
||||
for dep_name in dependency_names:
|
||||
dep_references.append(self[dep_name])
|
||||
return model_constructor(*dep_references)
|
||||
dependencies.append(self[dep_name])
|
||||
return model_constructor(*dependencies)
|
||||
|
||||
def _get_config_filepath(self, app_name, app_author, config_filename='config.ini'):
|
||||
"""
|
||||
|
@ -43,7 +43,7 @@ class Config:
|
||||
|
||||
def __getitem__(self, key):
|
||||
"""
|
||||
Returns the vaLue of the configuration item identified by <key>.
|
||||
Returns the value of the configuration item identified by <key>.
|
||||
"""
|
||||
try:
|
||||
return self.config_obj[key].dict()
|
||||
|
@ -285,7 +285,8 @@ class CommandTree:
|
||||
raise app_container.NoCommandSpecified('No command specified.')
|
||||
|
||||
def _invoke_command(self, cmd, args):
|
||||
func = cmd.callback
|
||||
command_to_be_invoked = cmd.callback
|
||||
func = command_to_be_invoked
|
||||
sig = cmd.func_signature
|
||||
params = sig.parameters
|
||||
params = [params[paramname] for paramname in params]
|
||||
@ -296,7 +297,7 @@ class CommandTree:
|
||||
|
||||
_bootstrap_logger.info('function: %s', func)
|
||||
_bootstrap_logger.info('function args: %s', func_args)
|
||||
return func(*func_args)
|
||||
return command_to_be_invoked(*func_args)
|
||||
|
||||
def _get_subparser(self):
|
||||
return self.root_parser._subparsers._actions[1]
|
||||
|
Loading…
Reference in New Issue
Block a user