Clear exception info to make sure things get collected, just in case.

This commit is contained in:
Jeremy Fincher 2004-01-15 11:54:41 +00:00
parent 74961db20e
commit 2a60ba61c5

View File

@ -39,6 +39,7 @@ import fix
import gc import gc
import os import os
import sys
import sre import sre
import time import time
import types import types
@ -74,6 +75,7 @@ tempvars = {} # A storage place for temporary variables that need to be
def upkeep(): # Function to be run on occasion to do upkeep stuff. def upkeep(): # Function to be run on occasion to do upkeep stuff.
"""Does upkeep (like flushing, garbage collection, etc.)""" """Does upkeep (like flushing, garbage collection, etc.)"""
sys.exc_clear() # Just in case, let's clear the exception info.
collected = gc.collect() collected = gc.collect()
if os.name == 'nt': if os.name == 'nt':
try: try: