From 14bf0a0a379003bae2c997a98a40c6c9f9553157 Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Tue, 7 Apr 2009 17:18:24 +0000 Subject: Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and as implemented in the Py3K branch. --- Lib/test/test_logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") -- cgit v0.12