Skip to content

Commit

Permalink
GUI Bugfix: Fix csv saving in analysis tab
Browse files Browse the repository at this point in the history
  • Loading branch information
torzdf committed Oct 6, 2019
1 parent fb34e17 commit 5887cb5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/gui/display_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,12 @@ def save_session(self):
logger.debug("No save file. Returning")
return

write_dicts = [val for val in self.summary.values()]
fieldnames = sorted(key for key in write_dicts[0].keys())

logger.debug("Saving to: '%s'", savefile)
fieldnames = sorted(key for key in self.summary[0].keys())
with savefile as outfile:
csvout = csv.DictWriter(outfile, fieldnames)
csvout.writeheader()
for row in write_dicts:
for row in self.summary:
csvout.writerow(row)


Expand Down

0 comments on commit 5887cb5

Please sign in to comment.