direct: change some variables to not override language builtins/keywords

Closes #1120
This commit is contained in:
Michael Wass 2021-02-23 17:13:34 -05:00 committed by rdb
parent 7a838e7212
commit 12e86bd842

View File

@ -124,8 +124,8 @@ class DistributedObject(DistributedObjectBase):
if field is not None:
p = DCPacker()
p.setUnpackData(field.getDefaultValue())
len = p.rawUnpackUint16() // 4
for i in range(len):
length = p.rawUnpackUint16() // 4
for i in range(length):
zone = int(p.rawUnpackUint32())
autoInterests.add(zone)
autoInterests.update(autoInterests)
@ -141,9 +141,9 @@ class DistributedObject(DistributedObjectBase):
_getAutoInterests = None
return list(autoInterests)
def setNeverDisable(self, bool):
assert bool == 1 or bool == 0
self.neverDisable = bool
def setNeverDisable(self, boolean):
assert boolean == 1 or boolean == 0
self.neverDisable = boolean
def getNeverDisable(self):
return self.neverDisable
@ -177,9 +177,9 @@ class DistributedObject(DistributedObjectBase):
# call this to throw out cached data from a previous instantiation
self._cachedData[name].flush()
def setCacheable(self, bool):
assert bool == 1 or bool == 0
self.cacheable = bool
def setCacheable(self, boolean):
assert boolean == 1 or boolean == 0
self.cacheable = boolean
def getCacheable(self):
return self.cacheable