Changed minimumDebugPriority to minimumPriority (since it's set in the debug module now anyway).

This commit is contained in:
Jeremy Fincher 2003-10-02 04:54:25 +00:00
parent 898a4e2ef1
commit da38a7b59b
2 changed files with 7 additions and 7 deletions

View File

@ -17,7 +17,7 @@ import debug
import utils import utils
import ircutils import ircutils
debug.minimumDebugPriority = 'high' debug.minimumPriority = 'high'
useColor = False useColor = False
@ -469,7 +469,7 @@ if __name__ == '__main__':
if yn('Would you like to turn this colorization off?') == 'y': if yn('Would you like to turn this colorization off?') == 'y':
debugVariables['colorterm'] = False debugVariables['colorterm'] = False
# debug.minimumDebugPriority # debug.minimumPriority
myPrint("""Your bot can handle debug messages at four priorities, 'high,' myPrint("""Your bot can handle debug messages at four priorities, 'high,'
'normal,' 'low,' and 'verbose,' in decreasing order of priority. By 'normal,' 'low,' and 'verbose,' in decreasing order of priority. By
default, your bot will log all of these priorities. You can, however, default, your bot will log all of these priorities. You can, however,
@ -484,7 +484,7 @@ if __name__ == '__main__':
priority = anything('What would you like the minimum priority to be? ' priority = anything('What would you like the minimum priority to be? '
'Just press enter to accept the default.') 'Just press enter to accept the default.')
if priority: if priority:
debugVariables['minimumDebugPriority'] = priority debugVariables['minimumPriority'] = priority
if advanced: if advanced:
myPrint("""Here's some stuff you only get to choose if you're an myPrint("""Here's some stuff you only get to choose if you're an

View File

@ -75,9 +75,9 @@ else:
# printf: True if printf debugging messages should be printed. # printf: True if printf debugging messages should be printed.
printf = False printf = False
# minimumDebugPriority: Lowest priority logged; # minimumPriority: Lowest priority logged;
# One of {'verbose', 'low', 'normal', 'high'}. # One of {'verbose', 'low', 'normal', 'high'}.
minimumDebugPriority = 'verbose' minimumPriority = 'verbose'
# deadlyExceptions: Exceptions that should cause immediate failure. # deadlyExceptions: Exceptions that should cause immediate failure.
deadlyExceptions = [KeyboardInterrupt, SystemExit] deadlyExceptions = [KeyboardInterrupt, SystemExit]
@ -197,7 +197,7 @@ def unrecoverableException():
exit(-1) exit(-1)
def msg(s, priority='low'): def msg(s, priority='low'):
if priorities[priority] >= priorities[minimumDebugPriority]: if priorities[priority] >= priorities[minimumPriority]:
if stderr: if stderr:
if colorterm: if colorterm:
sys.stderr.write(priorityColors.get(priority)) sys.stderr.write(priorityColors.get(priority))