mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
dist: style fix for None comparison in FreezeTool.py
This commit is contained in:
parent
05ed918d63
commit
5339b8239c
16
direct/src/dist/FreezeTool.py
vendored
16
direct/src/dist/FreezeTool.py
vendored
@ -852,7 +852,7 @@ class Freezer:
|
||||
allowChildren is true, the children of the indicated module
|
||||
may still be included."""
|
||||
|
||||
assert self.mf == None
|
||||
assert self.mf is None
|
||||
|
||||
self.modules[moduleName] = self.ModuleDef(
|
||||
moduleName, exclude = True,
|
||||
@ -886,7 +886,7 @@ class Freezer:
|
||||
print("couldn't import %s" % (moduleName))
|
||||
module = None
|
||||
|
||||
if module != None:
|
||||
if module is not None:
|
||||
for symbol in moduleName.split('.')[1:]:
|
||||
module = getattr(module, symbol)
|
||||
if hasattr(module, '__path__'):
|
||||
@ -901,7 +901,7 @@ class Freezer:
|
||||
if '.' in baseName:
|
||||
parentName, baseName = moduleName.rsplit('.', 1)
|
||||
path = self.getModulePath(parentName)
|
||||
if path == None:
|
||||
if path is None:
|
||||
return None
|
||||
|
||||
try:
|
||||
@ -925,7 +925,7 @@ class Freezer:
|
||||
print("couldn't import %s" % (moduleName))
|
||||
module = None
|
||||
|
||||
if module != None:
|
||||
if module is not None:
|
||||
for symbol in moduleName.split('.')[1:]:
|
||||
module = getattr(module, symbol)
|
||||
if hasattr(module, '__all__'):
|
||||
@ -938,7 +938,7 @@ class Freezer:
|
||||
if '.' in baseName:
|
||||
parentName, baseName = moduleName.rsplit('.', 1)
|
||||
path = self.getModulePath(parentName)
|
||||
if path == None:
|
||||
if path is None:
|
||||
return None
|
||||
|
||||
try:
|
||||
@ -995,7 +995,7 @@ class Freezer:
|
||||
for parentName, newParentName in parentNames:
|
||||
modules = self.getModuleStar(parentName)
|
||||
|
||||
if modules == None:
|
||||
if modules is None:
|
||||
# It's actually a regular module.
|
||||
mdefs[newParentName] = self.ModuleDef(
|
||||
parentName, implicit = implicit, guess = guess,
|
||||
@ -1031,7 +1031,7 @@ class Freezer:
|
||||
directories within a particular directory.
|
||||
"""
|
||||
|
||||
assert self.mf == None
|
||||
assert self.mf is None
|
||||
|
||||
if not newName:
|
||||
newName = moduleName
|
||||
@ -1053,7 +1053,7 @@ class Freezer:
|
||||
to done(), you may not add any more modules until you call
|
||||
reset(). """
|
||||
|
||||
assert self.mf == None
|
||||
assert self.mf is None
|
||||
|
||||
# If we are building an exe, we also need to implicitly
|
||||
# bring in Python's startup modules.
|
||||
|
Loading…
x
Reference in New Issue
Block a user