|
@@ -852,7 +852,7 @@ class Freezer:
|
|
|
allowChildren is true, the children of the indicated module
|
|
allowChildren is true, the children of the indicated module
|
|
|
may still be included."""
|
|
may still be included."""
|
|
|
|
|
|
|
|
- assert self.mf == None
|
|
|
|
|
|
|
+ assert self.mf is None
|
|
|
|
|
|
|
|
self.modules[moduleName] = self.ModuleDef(
|
|
self.modules[moduleName] = self.ModuleDef(
|
|
|
moduleName, exclude = True,
|
|
moduleName, exclude = True,
|
|
@@ -886,7 +886,7 @@ class Freezer:
|
|
|
print("couldn't import %s" % (moduleName))
|
|
print("couldn't import %s" % (moduleName))
|
|
|
module = None
|
|
module = None
|
|
|
|
|
|
|
|
- if module != None:
|
|
|
|
|
|
|
+ if module is not None:
|
|
|
for symbol in moduleName.split('.')[1:]:
|
|
for symbol in moduleName.split('.')[1:]:
|
|
|
module = getattr(module, symbol)
|
|
module = getattr(module, symbol)
|
|
|
if hasattr(module, '__path__'):
|
|
if hasattr(module, '__path__'):
|
|
@@ -901,7 +901,7 @@ class Freezer:
|
|
|
if '.' in baseName:
|
|
if '.' in baseName:
|
|
|
parentName, baseName = moduleName.rsplit('.', 1)
|
|
parentName, baseName = moduleName.rsplit('.', 1)
|
|
|
path = self.getModulePath(parentName)
|
|
path = self.getModulePath(parentName)
|
|
|
- if path == None:
|
|
|
|
|
|
|
+ if path is None:
|
|
|
return None
|
|
return None
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -925,7 +925,7 @@ class Freezer:
|
|
|
print("couldn't import %s" % (moduleName))
|
|
print("couldn't import %s" % (moduleName))
|
|
|
module = None
|
|
module = None
|
|
|
|
|
|
|
|
- if module != None:
|
|
|
|
|
|
|
+ if module is not None:
|
|
|
for symbol in moduleName.split('.')[1:]:
|
|
for symbol in moduleName.split('.')[1:]:
|
|
|
module = getattr(module, symbol)
|
|
module = getattr(module, symbol)
|
|
|
if hasattr(module, '__all__'):
|
|
if hasattr(module, '__all__'):
|
|
@@ -938,7 +938,7 @@ class Freezer:
|
|
|
if '.' in baseName:
|
|
if '.' in baseName:
|
|
|
parentName, baseName = moduleName.rsplit('.', 1)
|
|
parentName, baseName = moduleName.rsplit('.', 1)
|
|
|
path = self.getModulePath(parentName)
|
|
path = self.getModulePath(parentName)
|
|
|
- if path == None:
|
|
|
|
|
|
|
+ if path is None:
|
|
|
return None
|
|
return None
|
|
|
|
|
|
|
|
try:
|
|
try:
|
|
@@ -995,7 +995,7 @@ class Freezer:
|
|
|
for parentName, newParentName in parentNames:
|
|
for parentName, newParentName in parentNames:
|
|
|
modules = self.getModuleStar(parentName)
|
|
modules = self.getModuleStar(parentName)
|
|
|
|
|
|
|
|
- if modules == None:
|
|
|
|
|
|
|
+ if modules is None:
|
|
|
# It's actually a regular module.
|
|
# It's actually a regular module.
|
|
|
mdefs[newParentName] = self.ModuleDef(
|
|
mdefs[newParentName] = self.ModuleDef(
|
|
|
parentName, implicit = implicit, guess = guess,
|
|
parentName, implicit = implicit, guess = guess,
|
|
@@ -1031,7 +1031,7 @@ class Freezer:
|
|
|
directories within a particular directory.
|
|
directories within a particular directory.
|
|
|
"""
|
|
"""
|
|
|
|
|
|
|
|
- assert self.mf == None
|
|
|
|
|
|
|
+ assert self.mf is None
|
|
|
|
|
|
|
|
if not newName:
|
|
if not newName:
|
|
|
newName = moduleName
|
|
newName = moduleName
|
|
@@ -1053,7 +1053,7 @@ class Freezer:
|
|
|
to done(), you may not add any more modules until you call
|
|
to done(), you may not add any more modules until you call
|
|
|
reset(). """
|
|
reset(). """
|
|
|
|
|
|
|
|
- assert self.mf == None
|
|
|
|
|
|
|
+ assert self.mf is None
|
|
|
|
|
|
|
|
# If we are building an exe, we also need to implicitly
|
|
# If we are building an exe, we also need to implicitly
|
|
|
# bring in Python's startup modules.
|
|
# bring in Python's startup modules.
|