summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesus Cea <jcea@jcea.es>2011-09-19 16:57:18 +0200
committerJesus Cea <jcea@jcea.es>2011-09-19 16:57:18 +0200
commitd256ca12c13b20d243a27e143986426018b57877 (patch)
tree517df865b3a6a1d4ff784a493aa764a611a78a9c
parent607cc361bb489bb5d860ef162bcf91a7c7795d42 (diff)
downloadcpython-git-d256ca12c13b20d243a27e143986426018b57877.tar.gz
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
-rw-r--r--Lib/whichdb.py2
-rw-r--r--Misc/NEWS2
2 files changed, 3 insertions, 1 deletions
diff --git a/Lib/whichdb.py b/Lib/whichdb.py
index f077f87531..9071430b15 100644
--- a/Lib/whichdb.py
+++ b/Lib/whichdb.py
@@ -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
diff --git a/Misc/NEWS b/Misc/NEWS
index 7984e174e9..2b6788313e 100644
--- 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