Skip to content

Commit

Permalink
no init attr with no datamodels pr
Browse files Browse the repository at this point in the history
  • Loading branch information
tapastro committed Oct 4, 2024
1 parent 826b3a5 commit c7cf01a
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions jwst/stpipe/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ def finalize_result(self, result, reference_files_used):

if hasattr(result, 'cal_logs'):
tmpdict = result.cal_logs.instance
tmpdict[self.class_alias] = '\n'.join(self._log_records)
result.cal_logs = tmpdict
else:
tmpdict = dict()
tmpdict[self.class_alias] = '\n'.join(self._log_records)
result.cal_logs = tmpdict

def remove_suffix(self, name):
return remove_suffix(name)
Expand All @@ -126,9 +128,11 @@ def finalize_result(self, result, reference_files_used):

if hasattr(result, 'cal_logs'):
tmpdict = result.cal_logs.instance
tmpdict[self.class_alias] = '\n'.join(self._log_records)
else:
tmpdict = dict()
tmpdict[self.class_alias] = '\n'.join(self._log_records)

for _, step in self.step_defs.items():
if step.class_alias in tmpdict.keys():
del tmpdict[step.class_alias]
result.cal_logs = tmpdict
for _, step in self.step_defs.items():
if step.class_alias in tmpdict.keys():
del tmpdict[step.class_alias]
result.cal_logs = tmpdict

0 comments on commit c7cf01a

Please sign in to comment.