move isoformat to compat, allow date, misc fixes

This commit is contained in:
Sean Breckenridge 2021-04-06 01:31:04 -07:00
parent 28fd9e4441
commit 8a8bec332e
5 changed files with 36 additions and 35 deletions

View file

@ -127,7 +127,7 @@ def attach_dt(e: Exception, *, dt: Optional[datetime]) -> Exception:
# todo it might be problematic because might mess with timezones (when it's converted to string, it's converted to a shift)
def extract_error_datetime(e: Exception) -> Optional[datetime]:
from .common import fromisoformat
from .compat import fromisoformat
import re
for x in reversed(e.args):
if isinstance(x, datetime):