Final batch of code stability updates before anouther bout of extended testing. Still plenty to go, but making progress.
This commit is contained in:
@ -30,11 +30,12 @@ class memoryManager():
|
||||
if not self.listStorageValid(name):
|
||||
return
|
||||
if self.listStorage[name]['maxLength'] == None:
|
||||
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list']
|
||||
# Fallback: if maxLength is still None, apply default limit of 1000
|
||||
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list'][:999]
|
||||
else:
|
||||
self.listStorage[name]['list'] = [value] + self.listStorage[name]['list'][:self.listStorage[name]['maxLength'] -1]
|
||||
self.listStorage[name]['index'] = 0
|
||||
def addIndexList(self, name, maxLength = None, currList = [], currIndex = -1):
|
||||
def addIndexList(self, name, maxLength = 1000, currList = [], currIndex = -1):
|
||||
if len(currList) != 0 and (currIndex == -1):
|
||||
currIndex = 0
|
||||
self.listStorage[name] = {'list': currList, 'index': currIndex, 'maxLength': maxLength}
|
||||
|
Reference in New Issue
Block a user