UFOReader: close underlying fs object if UFOLibError raised in constructor
This commit is contained in:
parent
57f4904363
commit
c57e843d1f
@ -267,9 +267,14 @@ class UFOReader(_UFOBaseIO):
|
||||
)
|
||||
self._path = fsdecode(path)
|
||||
self._validate = validate
|
||||
self.readMetaInfo(validate=validate)
|
||||
self._upConvertedKerningData = None
|
||||
|
||||
try:
|
||||
self.readMetaInfo(validate=validate)
|
||||
except UFOLibError:
|
||||
self.close()
|
||||
raise
|
||||
|
||||
# properties
|
||||
|
||||
def _get_path(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user