From 29ba56515ae77dcbead1998531dca16fe329192d Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Fri, 19 Jul 2024 15:32:43 -0700 Subject: [PATCH] fix: future deprecation warning Use the elem is None test to address the future deprecation warning issued by Pytest. --- src/soso/strategies/eml.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soso/strategies/eml.py b/src/soso/strategies/eml.py index c05b96f..7d92418 100644 --- a/src/soso/strategies/eml.py +++ b/src/soso/strategies/eml.py @@ -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 = (