From fde429d40d82057d2507c657b9a7bbd30e369aa8 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Wed, 28 Sep 2022 12:21:38 +0200 Subject: [PATCH] raise ParseError if we get an exception on is_iso8601() --- iso8601/iso8601.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iso8601/iso8601.py b/iso8601/iso8601.py index d822f10..2a82894 100644 --- a/iso8601/iso8601.py +++ b/iso8601/iso8601.py @@ -158,5 +158,5 @@ def is_iso8601(datestring: str) -> bool: try: m = ISO8601_REGEX.match(datestring) return bool(m) - except Exception: - return False + except Exception as e: + raise ParseError(e)