Skip to content

Commit b9c191f

Browse files
committed
fix: bring back ModuleNotFoundError handler in pandas_backports.py
1 parent c8392fc commit b9c191f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

db_dtypes/pandas_backports.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@ def import_default(module_name, force=False, default=None):
6262
return default
6363

6464
name = default.__name__
65-
module = __import__(module_name, {}, {}, [name])
65+
try:
66+
module = __import__(module_name, {}, {}, [name])
67+
except ModuleNotFoundError:
68+
return default
6669

6770
return getattr(module, name, default)
6871

0 commit comments

Comments
 (0)