[Python-checkins] cpython (3.2): 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/7a41855b6196
changeset:   72414:7a41855b6196
branch:      3.2
parent:      72396:5deecc04b7a2
user:        Jesus Cea <jcea at jcea.es>
date:        Mon Sep 19 17:08:18 2011 +0200
summary:
  Close #13007: whichdb should recognize gdbm 1.9 magic numbers

files:
  Lib/dbm/__init__.py |  2 +-
  Misc/NEWS           |  2 ++
  2 files changed, 3 insertions(+), 1 deletions(-)


diff --git a/Lib/dbm/__init__.py b/Lib/dbm/__init__.py
--- a/Lib/dbm/__init__.py
+++ b/Lib/dbm/__init__.py
@@ -166,7 +166,7 @@
         return ""
 
     # Check for GNU dbm
-    if magic == 0x13579ace:
+    if magic in (0x13579ace, 0x13579acd, 0x13579acf):
         return "dbm.gnu"
 
     # Later versions of Berkeley db hash file have a 12-byte pad in
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,8 @@
 - Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
   Pipe.
 
+- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
+
 - Issue #12213: Fix a buffering bug with interleaved reads and writes that
   could appear on BufferedRandom streams.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list