Skip to content

Commit

Permalink
fix: future deprecation warning
Browse files Browse the repository at this point in the history
Use the len(elem) test to address the future deprecation warning 
issued by Pytest.
  • Loading branch information
clnsmth authored Jul 20, 2024
1 parent 07277f5 commit 5a74275
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 len(single_date_time) == 0:
return None
if not single_date_time.xpath(".//alternativeTimeScale"):
if len(single_date_time.xpath(".//alternativeTimeScale")) == 0:
calendar_date = single_date_time.findtext(".//calendarDate")
time = single_date_time.findtext(".//time")
instant = (
Expand Down

0 comments on commit 5a74275

Please sign in to comment.