mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
Fix compiling error when missing gdbm version macros (GH-7823)
This commit is contained in:
parent
16eb3bcdb2
commit
b248e957a8
3 changed files with 7 additions and 5 deletions
|
@ -12,9 +12,8 @@ class TestGdbm(unittest.TestCase):
|
|||
def setUpClass():
|
||||
if support.verbose:
|
||||
try:
|
||||
import _gdbm
|
||||
version = _gdbm._GDBM_VERSION
|
||||
except (ImportError, AttributeError):
|
||||
from _gdbm import _GDBM_VERSION as version
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
print(f"gdbm version: {version}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue