chainlib

Generic blockchain access library and tooling
Log | Files | Refs | README | LICENSE

commit 24a56194291f94ccd35f87ad4f4b9c8f1b11b093
parent f21b4f9fd2e9ec41292d76d36f9659b208417b06
Author: lash <dev@holbrook.no>
Date:   Tue, 14 Feb 2023 04:26:52 +0000

Simplify find handling

Diffstat:
Mchainlib/cli/find.py | 2+-
Mchainlib/runnable/find.py | 10++++++++--
2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/chainlib/cli/find.py b/chainlib/cli/find.py @@ -24,7 +24,7 @@ def execute_for_path(d, fltr=None, cmd=None, args=None, handler=None): return None __mf[s] = d logg.info('found chainlib module {} in {}'.format(s, d)) - m = import_module(s + '._clf') + m = import_module(s) handler(m, cmd, args) diff --git a/chainlib/runnable/find.py b/chainlib/runnable/find.py @@ -28,10 +28,16 @@ elif args.v: def default_handler(m, cmd, args): r = None if cmd == None: - r = m.default(args) + if args == None: + r = m.default() + else: + r = m.default(*args) else: fn = getattr(m, cmd) - r = fn(args) + if args == None: + r = fn() + else: + r = fn(*args) print(r)