[ttLib] use boolean instead of int

I know it's same, but this looks more 'pythonic'
This commit is contained in:
Cosimo Lupo 2016-02-02 18:26:50 +00:00
parent 84d6f076a3
commit f998cf1126

View File

@ -197,11 +197,11 @@ class TTFont(object):
if self.lazy and self.reader.file.name == file: if self.lazy and self.reader.file.name == file:
raise TTLibError( raise TTLibError(
"Can't overwrite TTFont when 'lazy' attribute is True") "Can't overwrite TTFont when 'lazy' attribute is True")
closeStream = 1 closeStream = True
file = open(file, "wb") file = open(file, "wb")
else: else:
# assume "file" is a writable file object # assume "file" is a writable file object
closeStream = 0 closeStream = False
tags = list(self.keys()) tags = list(self.keys())
if "GlyphOrder" in tags: if "GlyphOrder" in tags: