Merge pull request #1697 from fonttools/fix-minor-type-errors

Fix minor type errors found with pytype
This commit is contained in:
Nikolaus Waxweiler 2019-09-09 22:43:48 +01:00 committed by GitHub
commit afdb967a28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -61,6 +61,7 @@ def lib_convertCFFToCFF2(cff, otFont):
fdArray.append(fontDict) fdArray.append(fontDict)
fontDict.Private = privateDict fontDict.Private = privateDict
privateOpOrder = buildOrder(privateDictOperators2) privateOpOrder = buildOrder(privateDictOperators2)
if privateDict is not None:
for entry in privateDictOperators: for entry in privateDictOperators:
key = entry[1] key = entry[1]
if key not in privateOpOrder: if key not in privateOpOrder:

View File

@ -987,7 +987,7 @@ def parseArgs(args):
try: try:
axisLimits = parseLimits(options.locargs) axisLimits = parseLimits(options.locargs)
except ValueError as e: except ValueError as e:
parser.error(e) parser.error(str(e))
if len(axisLimits) != len(options.locargs): if len(axisLimits) != len(options.locargs):
parser.error("Specified multiple limits for the same axis") parser.error("Specified multiple limits for the same axis")