Skip to content

Commit

Permalink
Adding a Try to catch when file_dates not set in object.
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkehoe committed Dec 2, 2019
1 parent 51b0a22 commit 2dbcde3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion act/plotting/TimeSeriesDisplay.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,10 @@ def day_night_background(self, dsname=None, subplot_index=(0, )):
dsname = list(self._arm.keys())[0]

# Get File Dates
file_dates = self._arm[dsname].attrs['file_dates']
try:
file_dates = self._arm[dsname].attrs['file_dates']
except KeyError:
file_dates = []
if len(file_dates) == 0:
sdate = dt_utils.numpy_to_arm_date(
self._arm[dsname].time.values[0])
Expand Down

0 comments on commit 2dbcde3

Please sign in to comment.