improve error message
This commit is contained in:
parent
ac2413e905
commit
12ec7f539e
@ -844,7 +844,7 @@ class Glyph(object):
|
|||||||
try:
|
try:
|
||||||
coordinates, endPts, flags = g.getCoordinates(glyfTable)
|
coordinates, endPts, flags = g.getCoordinates(glyfTable)
|
||||||
except RuntimeError:
|
except RuntimeError:
|
||||||
raise ttLib.TTLibError("glyph '%s' contains recursive component reference" % compo.glyphName)
|
raise ttLib.TTLibError("glyph '%s' contains a recursive component reference" % compo.glyphName)
|
||||||
if hasattr(compo, "firstPt"):
|
if hasattr(compo, "firstPt"):
|
||||||
# move according to two reference points
|
# move according to two reference points
|
||||||
x1,y1 = allCoords[compo.firstPt]
|
x1,y1 = allCoords[compo.firstPt]
|
||||||
|
@ -237,7 +237,7 @@ class glyfTableTest(unittest.TestCase):
|
|||||||
glyph_B = pen_B.glyph()
|
glyph_B = pen_B.glyph()
|
||||||
glyphSet["A"] = glyph_A
|
glyphSet["A"] = glyph_A
|
||||||
glyphSet["B"] = glyph_B
|
glyphSet["B"] = glyph_B
|
||||||
with self.assertRaisesRegex(TTLibError, "glyph '.' contains recursive component reference"):
|
with self.assertRaisesRegex(TTLibError, "glyph '.' contains a recursive component reference"):
|
||||||
glyph_A.getCoordinates(glyphSet)
|
glyph_A.getCoordinates(glyphSet)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user