Skip to content

Commit

Permalink
Minor improvement to history writing
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Feb 10, 2016
1 parent 464c367 commit 7552a72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion stginga/plugins/SaveImage.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def _write_history(self, pfx, hdu, linechar=60, indentchar=2):

file_dict = self.history_obj.name_dict[self.chname]
chistory = []
ind = ' ' * indentchar

# NOTE: List comprehension too slow!
for key in file_dict:
Expand All @@ -264,7 +265,7 @@ def _write_history(self, pfx, hdu, linechar=60, indentchar=2):
for i in range(0, len(s), linechar):
subs = s[i:i+linechar]
if i > 0:
subs = ' ' * indentchar + subs.lstrip()
subs = ind + subs.lstrip()
hdu.header.add_history(subs)

def _write_header(self, image, hdu):
Expand Down

0 comments on commit 7552a72

Please sign in to comment.