Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc566b0

Browse files
committed
Close #13007: whichdb should recognize gdbm 1.9 magic numbers
1 parent 1d678f8 commit bc566b0

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/dbm/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def whichdb(filename):
166166
return ""
167167

168168
# Check for GNU dbm
169-
if magic == 0x13579ace:
169+
if magic in (0x13579ace, 0x13579acd, 0x13579acf):
170170
return "dbm.gnu"
171171

172172
# Later versions of Berkeley db hash file have a 12-byte pad in

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ Library
5555
- Issue #11657: Fix sending file descriptors over 255 over a multiprocessing
5656
Pipe.
5757

58+
- Issue #13007: whichdb should recognize gdbm 1.9 magic numbers.
59+
5860
- Issue #12213: Fix a buffering bug with interleaved reads and writes that
5961
could appear on BufferedRandom streams.
6062

0 commit comments

Comments
 (0)