Skip to content

Commit

Permalink
TIMESTAMP->dt: Use ImportError instead of ModuleNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Nov 21, 2022
1 parent fc434b9 commit 48d8bd7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Let's exercise all of them.

>>> try:
... import zoneinfo
... except ModuleNotFoundError:
... except ImportError:
... from backports import zoneinfo

>>> cursor.time_zone = zoneinfo.ZoneInfo("Australia/Sydney")
Expand Down
2 changes: 1 addition & 1 deletion src/crate/client/doctests/cursor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Let's exercise all of them::

>>> try:
... import zoneinfo
... except ModuleNotFoundError:
... except ImportError:
... from backports import zoneinfo
>>> cursor.time_zone = zoneinfo.ZoneInfo("Australia/Sydney")
>>> cursor.execute('')
Expand Down
2 changes: 1 addition & 1 deletion src/crate/client/test_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from unittest.mock import MagicMock
try:
import zoneinfo
except ModuleNotFoundError:
except ImportError:
from backports import zoneinfo

import pytz
Expand Down

0 comments on commit 48d8bd7

Please sign in to comment.