Skip to content

Commit

Permalink
fixed error on None config
Browse files Browse the repository at this point in the history
  • Loading branch information
foospidy committed Jul 7, 2023
1 parent 06a8afa commit 60e0a6e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pysigsci/bin/pysigscia
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 60e0a6e

Please sign in to comment.