Don't use has_key in post table; that's gone in python3

Raised here: https://github.com/behdad/fonttools/issues/124
This commit is contained in:
Behdad Esfahbod 2014-06-13 12:45:33 -04:00
parent b7367012e4
commit 4d6be6b7d2

View File

@ -113,7 +113,7 @@ class table__p_o_s_t(DefaultTable.DefaultTable):
if glyphName in allNames:
# make up a new glyphName that's unique
n = allNames[glyphName]
while allNames.has_key(glyphName + "#" + str(n)):
while (glyphName + "#" + str(n)) in allNames:
n += 1
allNames[glyphName] = n + 1
glyphName = glyphName + "#" + str(n)