Bug #820185: Intermittent TypeError NoneType in atexit handler of unit tests

Work around what appears to be a Python standard library bug by silencing
exceptions in the logging library.
This commit is contained in:
Ewan Mellor 2011-08-02 22:55:13 -07:00
parent 66c2e1c192
commit 3373382284
1 changed files with 6 additions and 0 deletions

View File

@ -12,6 +12,12 @@ from swift.common.utils import readconf
setattr(__builtin__, '_', lambda x: x)
# Work around what seems to be a Python bug.
# c.f. https://bugs.launchpad.net/swift/+bug/820185.
import logging
logging.raiseExceptions = False
def get_config():
"""
Attempt to get a functional config dictionary.