Skip to content

Commit

Permalink
Handled 'TypeError: can't subtract offset-naive and offset-aware date…
Browse files Browse the repository at this point in the history
…times' in the BetamaxAdapter class
  • Loading branch information
guriWiz committed May 5, 2024
1 parent 8348161 commit dd5396a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/betamax/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def load_cassette(self, cassette_name, serialize, options):
if self.options.get('re_record_interval'):
re_record_interval = timedelta(self.options['re_record_interval'])

now = datetime.now(timezone.utc)
now = datetime.now(timezone.utc).replace(tzinfo=None)
if re_record_interval < (now - self.cassette.earliest_recorded_date):
self.cassette.clear()

Expand Down

0 comments on commit dd5396a

Please sign in to comment.