From 7f6b0a7d69552bee9dbd19e44746a3ba644c2c26 Mon Sep 17 00:00:00 2001 From: Tal Leming Date: Mon, 17 Oct 2011 20:18:30 +0000 Subject: [PATCH] Nicer warnings. git-svn-id: http://svn.robofab.com/branches/ufo3k@411 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c --- Lib/ufoLib/glifLib.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/ufoLib/glifLib.py b/Lib/ufoLib/glifLib.py index 5e875d788..51f340139 100755 --- a/Lib/ufoLib/glifLib.py +++ b/Lib/ufoLib/glifLib.py @@ -1153,7 +1153,7 @@ def _buildOutlinePointsFormat2(pen, children, identifiers): pen.addPoint((x, y), segmentType=segmentType, smooth=smooth, name=name, identifier=identifier) except TypeError: pen.addPoint((x, y), segmentType=segmentType, smooth=smooth, name=name) - raise DeprecationWarning("The addPoint method needs an identifier kwarg. The point's identifier value has been discarded.") + raise warn("The addPoint method needs an identifier kwarg. The point's identifier value has been discarded.", DeprecationWarning) def _buildOutlineComponentFormat2(pen, (attrs, children), identifiers): if len(children): @@ -1182,7 +1182,7 @@ def _buildOutlineComponentFormat2(pen, (attrs, children), identifiers): pen.addComponent(baseGlyphName, tuple(transformation), identifier=identifier) except TypeError: pen.addComponent(baseGlyphName, tuple(transformation)) - raise DeprecationWarning("The addComponent method needs an identifier kwarg. The component's identifier value has been discarded.") + raise warn("The addComponent method needs an identifier kwarg. The component's identifier value has been discarded.", DeprecationWarning) # all formats