mirror of
https://github.com/python/cpython
synced 2026-09-29 11:35:29 +03:00
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
This commit is contained in:
commit
a372de8408
2 changed files with 3 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -236,6 +236,8 @@ Core and Builtins
|
|||
- Issue #10829: Refactor PyUnicode_FromFormat(), use the same function to parse
|
||||
the format string in the 3 steps, fix crashs on invalid format strings.
|
||||
|
||||
- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
|
||||
|
||||
- Issue #11246: Fix PyUnicode_FromFormat("%V") to decode the byte string from
|
||||
UTF-8 (with replace error handler) instead of ISO-8859-1 (in strict mode).
|
||||
Patch written by Ray Allen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue