]> granicus.if.org Git - python/commitdiff
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
authorJesus Cea <jcea@jcea.es>
Mon, 19 Sep 2011 15:08:18 +0000 (17:08 +0200)
committerJesus Cea <jcea@jcea.es>
Mon, 19 Sep 2011 15:08:18 +0000 (17:08 +0200)
Lib/dbm/__init__.py
Misc/NEWS

index 76a43c43f38be02a5987b5f19c8c4d119332f82e..813a29d70922814b20a93ed7cc68df7673d12a30 100644 (file)
@@ -166,7 +166,7 @@ def whichdb(filename):
         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
index 5289c3799dd24a30e643c11169f57ea3cfe575b0..bfe536925aa2d93f29b41ed6bb4e002bf455c724 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -55,6 +55,8 @@ Library
 - 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.