Skip to content

Commit c34f002

Browse files
committed
redis import failure on python2 causes crash
Don't use ModuleNotFoundError, it's python 3.6+. Use plain ImportError instead.
1 parent 1f0f720 commit c34f002

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

roundup/backends/back_anydbm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
try:
3939
from roundup.backends import sessions_redis
40-
except ModuleNotFoundError:
40+
except ImportError:
4141
sessions_redis = None
4242

4343
from roundup.backends.indexer_common import get_indexer

roundup/backends/back_sqlite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
try:
1919
from roundup.backends import sessions_redis
20-
except ModuleNotFoundError:
20+
except ImportError:
2121
sessions_redis = None
2222

2323
from roundup.anypy.strings import uany2s

0 commit comments

Comments
 (0)