[ttGlyph] Adjust contextmanager pattern
This commit is contained in:
parent
e07fafc324
commit
f3f50393a8
@ -45,9 +45,10 @@ class _TTGlyphSet(Mapping):
|
|||||||
self.location = self.location.copy()
|
self.location = self.location.copy()
|
||||||
self.location.update(location)
|
self.location.update(location)
|
||||||
|
|
||||||
yield None
|
try:
|
||||||
|
yield None
|
||||||
self.location = self.locationStack.pop()
|
finally:
|
||||||
|
self.location = self.locationStack.pop()
|
||||||
|
|
||||||
def __contains__(self, glyphName):
|
def __contains__(self, glyphName):
|
||||||
return glyphName in self.glyphsMapping
|
return glyphName in self.glyphsMapping
|
||||||
|
Loading…
x
Reference in New Issue
Block a user