From 12ec7f539eab2a54d454c0d980eca396f53a3f61 Mon Sep 17 00:00:00 2001 From: justvanrossum Date: Sun, 17 Mar 2019 15:35:35 +0100 Subject: [PATCH] improve error message --- Lib/fontTools/ttLib/tables/_g_l_y_f.py | 2 +- Tests/ttLib/tables/_g_l_y_f_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py index 148d7ec00..4a629230e 100644 --- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py +++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py @@ -844,7 +844,7 @@ class Glyph(object): try: coordinates, endPts, flags = g.getCoordinates(glyfTable) 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"): # move according to two reference points x1,y1 = allCoords[compo.firstPt] diff --git a/Tests/ttLib/tables/_g_l_y_f_test.py b/Tests/ttLib/tables/_g_l_y_f_test.py index e3d09b7e1..00c74bcf5 100644 --- a/Tests/ttLib/tables/_g_l_y_f_test.py +++ b/Tests/ttLib/tables/_g_l_y_f_test.py @@ -237,7 +237,7 @@ class glyfTableTest(unittest.TestCase): glyph_B = pen_B.glyph() glyphSet["A"] = glyph_A 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)