[Python-checkins] cpython (2.7): Close #13007: whichdb should recognize gdbm 1.9 magic numbers

jesus.cea python-checkins at python.org
Mon Sep 19 17:13:28 CEST 2011


http://hg.python.org/cpython/rev/14cafb8d1480
changeset: 72413:14cafb8d1480
branch: 2.7
parent: 72398:9f3595fb6c92
user: Jesus Cea <jcea at jcea.es>
date: Mon Sep 19 16:57:18 2011 +0200
summary:
 Close #13007: whichdb should recognize gdbm 1.9 magic numbers
files:
 Lib/whichdb.py | 2 +-
 Misc/NEWS | 2 ++
 2 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Lib/whichdb.py b/Lib/whichdb.py
--- a/Lib/whichdb.py
+++ b/Lib/whichdb.py
@@ -91,7 +91,7 @@
 return ""
 
 # Check for GNU dbm
- if magic == 0x13579ace:
+ if magic in (0x13579ace, 0x13579acd, 0x13579acf):
 return "gdbm"
 
 # Check for old Berkeley db hash file format v2
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -76,6 +76,8 @@
 - Issue #12326: sys.platform is now always 'linux2' on Linux, even if Python
 is compiled on Linux 3.
 
+- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
+
 - Issue #9173: Let shutil._make_archive work if the logger argument is None.
 
 - Issue #12650: Fix a race condition where a subprocess.Popen could leak
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /