]> 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 14:57:18 +0000 (16:57 +0200)
committerJesus Cea <jcea@jcea.es>
Mon, 19 Sep 2011 14:57:18 +0000 (16:57 +0200)
Lib/whichdb.py
Misc/NEWS

index f077f875310eeeacb0ff844c186db21baf36874c..9071430b154c080c1e7278032e151d8800e7abc2 100644 (file)
@@ -91,7 +91,7 @@ def whichdb(filename):
         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
index 7984e174e9c672ad7e551992ef6f6f2464ed9864..2b6788313eef230dd534ecbaecac8291dae303e5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -76,6 +76,8 @@ Library
 - 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