summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 72dded5..adeee7d 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -914,8 +914,8 @@ class WarningsTest(BaseTest):
def test_warnings(self):
with warnings.catch_warnings():
logging.captureWarnings(True)
- warnings.filterwarnings("always", category=UserWarning)
try:
+ warnings.filterwarnings("always", category=UserWarning)
file = cStringIO.StringIO()
h = logging.StreamHandler(file)
logger = logging.getLogger("py.warnings")