Merge pull request #28 from olivierberten/ttc

Catch TTLibError raised when missing (or wrong) -y argument on a ttc file
This commit is contained in:
Behdad Esfahbod 2013-11-25 04:44:04 -08:00
commit 5f875e76d6

View File

@ -70,7 +70,7 @@ import sys
import os import os
import getopt import getopt
import re import re
from fontTools.ttLib import TTFont from fontTools.ttLib import TTFont, TTLibError
from fontTools.ttLib.tables.otBase import OTLOffsetOverflowError from fontTools.ttLib.tables.otBase import OTLOffsetOverflowError
from fontTools.ttLib.tables.otTables import fixLookupOverFlows, fixSubTableOverFlows from fontTools.ttLib.tables.otTables import fixLookupOverFlows, fixSubTableOverFlows
from fontTools.misc.macCreatorType import getMacCreatorAndType from fontTools.misc.macCreatorType import getMacCreatorAndType
@ -337,6 +337,8 @@ def main(args):
waitForKeyPress() waitForKeyPress()
else: else:
raise raise
except TTLibError, e:
print "Error:",e
except: except:
if sys.platform == "win32": if sys.platform == "win32":
import traceback import traceback