Skip to content
Prev Previous commit
Next Next commit
add case for non-convertable date type
  • Loading branch information
OffBy0x01 committed May 14, 2021
commit 06528e3c9f97faad17e1078762b9c413b38f45d3
1 change: 1 addition & 0 deletions blackduck/Utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def to_datetime(date):
month=date.month,
day=date.day
)
raise TypeError(f"object of type {type(date)} cannot be converted to datetime")


def timespan(days_ago, from_date=datetime.now(), delta=timedelta(weeks=1)):
Expand Down