From 60e0a6ea13b39b84aee01245ef40378114d7754f Mon Sep 17 00:00:00 2001 From: PX Mx Date: Fri, 7 Jul 2023 14:14:59 -0400 Subject: [PATCH] fixed error on None config --- pysigsci/bin/pysigscia | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pysigsci/bin/pysigscia b/pysigsci/bin/pysigscia index 763d4ee..4c771ad 100755 --- a/pysigsci/bin/pysigscia +++ b/pysigsci/bin/pysigscia @@ -65,6 +65,9 @@ def diff_config(config, site1, site2, directory='/tmp/pysigsci/audit'): """ with open('{}/{}.{}.json'.format(directory, site1, config), 'r') as infile: config1 = json.load(infile)['data'] + + if config1 is None: + config1 = {} size1 = len(config1) for i in range(size1): @@ -100,6 +103,8 @@ def diff_config(config, site1, site2, directory='/tmp/pysigsci/audit'): with open('{}/{}.{}.json'.format(directory, site2, config), 'r') as infile: config2 = json.load(infile)['data'] + if config2 is None: + config2 = {} size2 = len(config2) for i in range(size2):