Skip to content

Commit

Permalink
Merge pull request #3849 from dstansby/time-warn
Browse files Browse the repository at this point in the history
Improve warning when date-obs keyword not present
  • Loading branch information
nabobalis committed Feb 25, 2020
2 parents c4c8629 + bc42bc6 commit 89024fd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion sunpy/map/mapbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,9 @@ def date(self):
time = self.meta.get('date-obs', None)
if time is None:
if self._default_time is None:
warnings.warn("Missing metadata for observation time: setting observation time to current time.",
warnings.warn("Missing metadata for observation time, "
"setting observation time to current time. "
"Set the 'DATE-OBS' FITS keyword to prevent this warning.",
SunpyUserWarning)
self._default_time = parse_time('now')
time = self._default_time
Expand Down

0 comments on commit 89024fd

Please sign in to comment.