summaryrefslogtreecommitdiff
path: root/Lib/chunk.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-04-12 22:55:07 +0000
committerGuido van Rossum <guido@python.org>2007-04-12 22:55:07 +0000
commitdc0b1a106981ee204936221f4e0863bd1d7a6ba6 (patch)
tree102949af2918a30ac4da920751e994c0df4af702 /Lib/chunk.py
parentb6f1fdc90ca1f5826c5bd8e015a37563923144b5 (diff)
downloadcpython-git-dc0b1a106981ee204936221f4e0863bd1d7a6ba6.tar.gz
Make a few more tests pass with the new I/O library.
Fix the truncate() semantics -- it should not affect the current position. Switch wave.py/chunk.py to struct.unpack_from() to support bytes. Don't use writelines() on binary files (test_fileinput.py).
Diffstat (limited to 'Lib/chunk.py')
-rw-r--r--Lib/chunk.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/chunk.py b/Lib/chunk.py
index a8fbc1051f..32aada8aef 100644
--- a/Lib/chunk.py
+++ b/Lib/chunk.py
@@ -62,7 +62,7 @@ class Chunk:
if len(self.chunkname) < 4:
raise EOFError
try:
- self.chunksize = struct.unpack(strflag+'L', file.read(4))[0]
+ self.chunksize = struct.unpack_from(strflag+'L', file.read(4))[0]
except struct.error:
raise EOFError
if inclheader: