Added debug.reset, necessary for helping out testing.

This commit is contained in:
Jeremy Fincher 2003-09-29 04:41:18 +00:00
parent 0843710626
commit f6ccc126a3

View File

@ -105,6 +105,18 @@ priorityColors.setdefault('')
# If the most recent time is # If the most recent time is
lastTimes = [time.time()-1] * 10 lastTimes = [time.time()-1] * 10
def reset():
global _errorfd, _debugfd, _tracefd
_errorfd.flush()
_errorfd.close()
_errorfd = file(_errorfd.name, 'a')
_debugfd.flush()
_debugfd.close()
_debugfd = file(_errorfd.name, 'a')
_tracefd.flush()
_tracefd.close()
_tracefd = file(_errorfd.name, 'w')
def exit(i=-1): def exit(i=-1):
class E(Exception): class E(Exception):
pass pass