Use "is None" instead of "== None"
The latter hits the __eq__ method and can fail because we now
do not allow comparing objects of different types.
For example, was failing subsetting Andika-R.ttf.
diff --git a/Lib/fontTools/cffLib.py b/Lib/fontTools/cffLib.py
index 537fd98..e3b00c9 100644
--- a/Lib/fontTools/cffLib.py
+++ b/Lib/fontTools/cffLib.py
@@ -482,7 +482,7 @@
assert False, "unsupported FDSelect format: %s" % format
else:
# reading from XML. Make empty gidArray,, and leave format as passed in.
- # format == None will result in the smallest representation being used.
+ # format is None will result in the smallest representation being used.
self.format = format
self.gidArray = []
@@ -514,9 +514,9 @@
self.charStringsAreIndexed = 0
self.globalSubrs = globalSubrs
self.private = private
- if fdSelect != None:
+ if fdSelect is not None:
self.fdSelect = fdSelect
- if fdArray!= None:
+ if fdArray is not None:
self.fdArray = fdArray
def keys(self):