forgot to commit a file in previous commit (r74994, issue #6954)

This commit is contained in:
Tarek Ziadé 2009-09-21 13:49:57 +00:00
parent 9977335984
commit 0cfef2c3a4
1 changed files with 3 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import shutil
import tempfile
from distutils import log
from distutils.log import DEBUG, INFO, WARN, ERROR, FATAL
from distutils.core import Distribution
from test.test_support import EnvironmentVarGuard
@ -25,6 +26,8 @@ class LoggingSilencer(object):
super(LoggingSilencer, self).tearDown()
def _log(self, level, msg, args):
if level not in (DEBUG, INFO, WARN, ERROR, FATAL):
raise ValueError('%s wrong log level' % str(level))
self.logs.append((level, msg, args))
def get_logs(self, *levels):