From 3373382284a0c998c3af939e256abb2684a2bce5 Mon Sep 17 00:00:00 2001 From: Ewan Mellor Date: Tue, 2 Aug 2011 22:55:13 -0700 Subject: [PATCH] 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. --- test/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/__init__.py b/test/__init__.py index 1ec2e62e7b..ef2ce31744 100644 --- a/test/__init__.py +++ b/test/__init__.py @@ -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.