From: Vinay Sajip Date: Tue, 7 Apr 2009 17:18:24 +0000 (+0000) Subject: Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and as... X-Git-Tag: v2.7a1~1534 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=14bf0a0a379003bae2c997a98a40c6c9f9553157;p=python Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and as implemented in the Py3K branch. --- diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 72dded5f82..adeee7d853 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")