diff options
author | Xiang Zhang <angwerzx@126.com> | 2018-06-20 21:23:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 21:23:30 +0800 |
commit | b248e957a818e268cfb221f3b94b37bc5672456a (patch) | |
tree | 121b943a976ef4d5487c5307b733bde366ab9cb8 /Lib/test/test_dbm_gnu.py | |
parent | 16eb3bcdb22be4d82dc597b92b7154fcb11c6479 (diff) | |
download | cpython-b248e957a818e268cfb221f3b94b37bc5672456a.tar.gz cpython-b248e957a818e268cfb221f3b94b37bc5672456a.zip |
Fix compiling error when missing gdbm version macros (GH-7823)
Diffstat (limited to 'Lib/test/test_dbm_gnu.py')
-rw-r--r-- | Lib/test/test_dbm_gnu.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_dbm_gnu.py b/Lib/test/test_dbm_gnu.py index 49f91705b5b..c96eff5a319 100644 --- a/Lib/test/test_dbm_gnu.py +++ b/Lib/test/test_dbm_gnu.py @@ -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}") |