summaryrefslogtreecommitdiffstats
path: root/Lib/aifc.py
diff options
context:
space:
mode:
authorSjoerd Mullender <sjoerd@acm.org>1994-10-03 10:21:06 (GMT)
committerSjoerd Mullender <sjoerd@acm.org>1994-10-03 10:21:06 (GMT)
commitebea896e208686b41a04d58f8adeff2623c7ee5d (patch)
tree52f6c987996d06cc10939799c2f414e1f6d65217 /Lib/aifc.py
parent3a80c8defe29ac7d169ad3d791f67bcaf7a9b3f2 (diff)
downloadcpython-ebea896e208686b41a04d58f8adeff2623c7ee5d.zip
cpython-ebea896e208686b41a04d58f8adeff2623c7ee5d.tar.gz
cpython-ebea896e208686b41a04d58f8adeff2623c7ee5d.tar.bz2
Ignore empty markers.
Diffstat (limited to 'Lib/aifc.py')
-rw-r--r--Lib/aifc.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/aifc.py b/Lib/aifc.py
index 22bff01..d13a3b1 100644
--- a/Lib/aifc.py
+++ b/Lib/aifc.py
@@ -593,7 +593,11 @@ class Aifc_read:
id = _read_short(chunk)
pos = _read_long(chunk)
name = _read_string(chunk)
- self._markers.append((id, pos, name))
+ if pos or name:
+ # some files appear to have
+ # dummy markers consisting of
+ # a position 0 and name ''
+ self._markers.append((id, pos, name))
except EOFError:
print 'Warning: MARK chunk contains only',
print len(self._markers),