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 7, 2024
1 parent 828fab7 commit 51837d1
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 @@ -101,8 +101,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 Down Expand Up @@ -138,9 +140,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 51837d1

Please sign in to comment.