Define colorinfo even if no header line found

This commit is contained in:
Guido van Rossum 1992-05-06 17:58:18 +00:00
parent 9ea0fbc6de
commit 2c8bf9d400
1 changed files with 1 additions and 2 deletions

View File

@ -31,12 +31,11 @@ def openvideo(name):
sys.exit(1)
line = f.readline()
if not line: raise EndOfFile
colorinfo = (8, 0, 0, 0)
if line[:4] == 'CMIF':
if line[:14] == 'CMIF video 2.0':
line = f.readline()
colorinfo = eval(line[:-1])
else:
colorinfo = (8,0,0,0)
line = f.readline()
x = eval(line[:-1])
if len(x) == 3: w, h, pf = x