From 341edccde94ec41545f66a66998fb6cbf79524a1 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Sun, 16 Jan 2022 17:12:18 +0000 Subject: [PATCH] gdbm-import # DP: suggest installation of python3-gdbm package on failing _gdbm import # DP: suggest installation of python3-gdbm package on failing _gdbm import Gbp-Pq: Name gdbm-import.diff --- Lib/dbm/gnu.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/dbm/gnu.py b/Lib/dbm/gnu.py index b07a1de..24ba36f 100644 --- a/Lib/dbm/gnu.py +++ b/Lib/dbm/gnu.py @@ -1,3 +1,6 @@ """Provide the _gdbm module as a dbm submodule.""" -from _gdbm import * +try: + from _gdbm import * +except ImportError as msg: + raise ImportError(str(msg) + ', please install the python3-gdbm package') -- 2.30.2