Nicer warnings.

git-svn-id: http://svn.robofab.com/branches/ufo3k@411 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c
This commit is contained in:
Tal Leming 2011-10-17 20:18:30 +00:00
parent 64ebada787
commit 7f6b0a7d69

View File

@ -1153,7 +1153,7 @@ def _buildOutlinePointsFormat2(pen, children, identifiers):
pen.addPoint((x, y), segmentType=segmentType, smooth=smooth, name=name, identifier=identifier) pen.addPoint((x, y), segmentType=segmentType, smooth=smooth, name=name, identifier=identifier)
except TypeError: except TypeError:
pen.addPoint((x, y), segmentType=segmentType, smooth=smooth, name=name) 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): def _buildOutlineComponentFormat2(pen, (attrs, children), identifiers):
if len(children): if len(children):
@ -1182,7 +1182,7 @@ def _buildOutlineComponentFormat2(pen, (attrs, children), identifiers):
pen.addComponent(baseGlyphName, tuple(transformation), identifier=identifier) pen.addComponent(baseGlyphName, tuple(transformation), identifier=identifier)
except TypeError: except TypeError:
pen.addComponent(baseGlyphName, tuple(transformation)) 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 # all formats