commit 7d7209dd31e88d5eb9df55bd36545f49f4f0a7a3
parent 1373cb10e67ca16bf60b85b4de42e8302af6813a
Author: nolash <dev@holbrook.no>
Date: Wed, 27 Oct 2021 20:53:07 +0200
Handle missing dumpconfig arg
Diffstat:
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/chainlib/cli/arg.py b/chainlib/cli/arg.py
@@ -107,7 +107,7 @@ class ArgumentParser(argparse.ArgumentParser):
self.add_argument(arg[0], type=arg[1], help=arg[2])
args = super(ArgumentParser, self).parse_args(args=argv)
- if args.dumpconfig:
+ if getattr(args, 'dumpconfig', None) != None:
return args
if len(self.pos_args) == 1:
diff --git a/chainlib/cli/config.py b/chainlib/cli/config.py
@@ -236,7 +236,7 @@ class Config(confini.Config):
if existing_r == None or r != None:
config.add(r, v, exists_ok=True)
- if getattr(args, 'dumpconfig'):
+ if getattr(args, 'dumpconfig', None) != None:
config_keys = config.all()
with_values = not config.get('_RAW')
for k in config_keys:
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainlib
-version = 0.0.10a7
+version = 0.0.10a8
description = Generic blockchain access library and tooling
author = Louis Holbrook
author_email = dev@holbrook.no