Skip to content

Commit a2ffbc3

Browse files
committed
Clean up logging traceback to better encorperate ZoneInfo error.
1 parent 0066aef commit a2ffbc3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/hecdss/hecdss.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,8 +477,7 @@ def _get_timeseries(self, pathname, startDateTime, endDateTime, trim):
477477
try:
478478
new_times = [i.replace(tzinfo=ZoneInfo(timeZoneName)) for i in new_times]
479479
except ZoneInfoNotFoundError as e:
480-
print(f"Warning: The timezone '{timeZoneName}' was not found. Using no zone instead.")
481-
print(e)
480+
print(f"Warning: {e}. Using no zone instead.")
482481
timeZoneName = False
483482
elif (DssPath(pathname).D.lower() == "ts-pattern"):
484483
new_times = []

0 commit comments

Comments
 (0)