]> git.ipfire.org Git - thirdparty/psycopg.git/commit
fix: catch any type of error if ZoneInfo creation fails
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 14 Sep 2022 11:50:05 +0000 (12:50 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 14 Sep 2022 11:50:05 +0000 (12:50 +0100)
commite20f1c3c91eebcf8495bdd63ac543b9cbfc6b772
tree50cbf2d63061183757a7ab82c2a574fdc44289e3
parenta7b1da242e3138abc43e8d99b91153c0bfaa8799
fix: catch any type of error if ZoneInfo creation fails

OSError would be enough to solve the problem reported in #371. However,
in case of error, Windows C implementation segfaults. I would prefer to
not chase this error just because of weirdness in the tzdata external
library, so let's cast a wider net.

Fix #371
psycopg/psycopg/_tz.py
psycopg_c/psycopg_c/types/datetime.pyx