Skip to content

Commit

Permalink
fix: future deprecation warning
Browse files Browse the repository at this point in the history
Use the elem is None test to address the future deprecation warning
issued by Pytest.
  • Loading branch information
clnsmth committed Jul 19, 2024
1 parent 07277f5 commit 29ba565
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/soso/strategies/eml.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,9 +410,9 @@ def convert_single_date_time_type(
SingleDateTimeType element represents a geologic age, otherwise it
represents a calendar date and/or time.
"""
if not single_date_time:
if single_date_time is None:
return None
if not single_date_time.xpath(".//alternativeTimeScale"):
if single_date_time.xpath(".//alternativeTimeScale") is None:
calendar_date = single_date_time.findtext(".//calendarDate")
time = single_date_time.findtext(".//time")
instant = (
Expand Down

0 comments on commit 29ba565

Please sign in to comment.