Skip to content

Commit

Permalink
Fixed config, still working on the other issue...
Browse files Browse the repository at this point in the history
  • Loading branch information
Rehouma63 committed Aug 14, 2023
1 parent 698fd42 commit af68415
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions sarracenia/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,23 +2094,22 @@ def dump(self):
print('\t\"%s\": %s' % (pid, json.dumps(self.procs[pid], sort_keys=True, indent=4) ))
if procs_length-1 > index:
print(',')

print('},\n\n\"Configs\" : {\n\n')
print('\n\n,"Configs\" : {\n\n')
configLength = len(self.configs)
for indexConfig,c in enumerate(self.configs):
lengthSelfConfigC = len(self.configs[c])
for indexC,cfg in enumerate(self.configs[c]):
print('\t\"%s\": { ' % c)
self.configs[c][cfg]['options']={ 'omitted': 'use show' }
self.configs[c][cfg]['credentials']=[ 'omitted' ]
print('\t\t\"%s\" : %s ' % (cfg, json.dumps(self.configs[c][cfg])))
cLength = len(self.configs[c])
#if cLength-1 > indexC:
#print(',')
if configLength-1 > indexConfig :
if c != "report":
print(',' )

print('\n\n},States": { \n\n')
print('\t\t\"%s\" : %s }' % (cfg, json.dumps(self.configs[c][cfg])))
if lengthSelfConfigC-1 > indexC:
print(',')
if configLength-1 > indexConfig and lengthSelfConfigC != 0:
print(',')

print('\n\n},"States": { \n\n')
lengthSelfStates = len(self.states)
for indexSelfStates,c in enumerate(self.states):
print('\t\"%s\": { ' % c)
Expand Down

0 comments on commit af68415

Please sign in to comment.