From 2a57ef7b10610704c2165fa3770c5a2b3dd1f5fb Mon Sep 17 00:00:00 2001 From: Tal Leming Date: Thu, 28 Apr 2011 14:22:09 +0000 Subject: [PATCH] Remove some error handling from the Unicode parser. This makes it more like the rest of glifLib. This kind of wrapping might be useful, but it should be done consistently. git-svn-id: http://svn.robofab.com/trunk@238 b5fa9d6c-a76f-4ffd-b3cb-f825fc41095c --- Lib/robofab/glifLib2.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Lib/robofab/glifLib2.py b/Lib/robofab/glifLib2.py index 2dcae1bba..c5afb737f 100755 --- a/Lib/robofab/glifLib2.py +++ b/Lib/robofab/glifLib2.py @@ -575,12 +575,7 @@ class _FetchUnicodesParser(object): def startElementHandler(self, name, attrs): if name == "unicode" and len(self._elementStack) == 1 and self._elementStack[0] == "glyph": value = attrs.get("hex") - if value is None: - raise GlifLibError("The required hex attribute not defined in a unicode element.") - try: - value = int(value, 16) - except ValueError: - raise GlifLibError("The value for the hex attribute defined in a unicode element is not a valid value.") + value = int(value, 16) self.unicodes.append(value) self._elementStack.append(name)