Skip to content

Commit

Permalink
FIX: Added try and except to check for both cftime and netCDF4
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Nov 12, 2019
1 parent c5a0d91 commit b0fe687
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyart/util/datetime_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
"""

from cftime import num2date, date2num
try:
from cftime import num2date, date2num
except ImportError
from netCDF4 import num2date, date2num

EPOCH_UNITS = "seconds since 1970-01-01T00:00:00Z"

Expand Down

0 comments on commit b0fe687

Please sign in to comment.