Skip to content

Commit

Permalink
try fix wrong order of summary csv
Browse files Browse the repository at this point in the history
  • Loading branch information
niehues committed Dec 14, 2023
1 parent fa63a3f commit bd4d11a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/motbxtools/motbxschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,14 @@ def summarise(self, summary_csv_path, validate=True, exclude_invalid=False,
if old_summary_csv_path: # load summary CSV from previous version
summary_old = self._load_summary(old_summary_csv_path)

with (self._summary_file(summary_csv_path) as summary,
with (open(summary_csv_path, "w") as file_path,
self._changelog_file(changelog_path) as changelog,
self._validation_file(validationlog_path) as errorlog):
if not errorlog:
errorlog = sys.stdout
sf = open(file_path, "w", newline="", encoding="utf-8")
summary = csv.DictWriter(sf, fieldnames=self.fieldnames)
summary.writeheader()

resource_ids = set()
# iterate through resources
Expand Down

0 comments on commit bd4d11a

Please sign in to comment.