Skip to content

Commit

Permalink
remove try/except for removed ValueError
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Feb 4, 2022
1 parent bfffeca commit bfb21da
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions augur/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,11 @@ def get_numerical_dates(meta_dict, name_col = None, date_col='date', fmt=None, m
if isinstance(meta_dict, dict):
for k,m in meta_dict.items():
v = m[date_col]
try:
numerical_dates[k] = get_numerical_date_from_value(
v,
fmt,
min_max_year
)
except ValueError:
print(
"WARNING: %s has an invalid data string: %s"% (k, v),
file=sys.stderr
)
continue
numerical_dates[k] = get_numerical_date_from_value(
v,
fmt,
min_max_year
)
elif isinstance(meta_dict, pd.DataFrame):
strains = meta_dict.index.values
dates = meta_dict[date_col].apply(
Expand Down

0 comments on commit bfb21da

Please sign in to comment.