added error messages to the assert statements

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@45 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
Just 2000-01-03 23:00:55 +00:00
parent f8fd4777d2
commit e23942f0e6

View File

@ -12,8 +12,8 @@ class table_L_T_S_H_(DefaultTable.DefaultTable):
def decompile(self, data, ttFont): def decompile(self, data, ttFont):
version, numGlyphs = struct.unpack(">HH", data[:4]) version, numGlyphs = struct.unpack(">HH", data[:4])
data = data[4:] data = data[4:]
assert version == 0 assert version == 0, "unknown version: %s" % version
assert len(data) == numGlyphs assert len(data) == numGlyphs, "numGlyphs doesn't match data length"
# ouch: the assertion is not true in Chicago! # ouch: the assertion is not true in Chicago!
#assert numGlyphs == ttFont['maxp'].numGlyphs #assert numGlyphs == ttFont['maxp'].numGlyphs
yPels = array.array("B") yPels = array.array("B")