From 71d180568322dc23eea2b48ebf93dd7d89b9362b Mon Sep 17 00:00:00 2001 From: John Dickinson Date: Tue, 26 Nov 2013 14:39:30 -0800 Subject: [PATCH] bare excepts, as is proper Change-Id: Ifd28f6f14a781a67644315690491888161a7250c --- swift/common/memcached.py | 5 +---- test/unit/common/test_memcached.py | 6 +----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/swift/common/memcached.py b/swift/common/memcached.py index bfacb3e3c6..59ca38c059 100644 --- a/swift/common/memcached.py +++ b/swift/common/memcached.py @@ -150,10 +150,7 @@ class MemcacheConnPool(Pool): if self.current_size <= self.max_size: try: created = self.create() - # This was really supposed to be "except:" but ran afoul of the - # H201 check, which does not implement the "noqa" exception. Once - # that's fixed, the except here can be changed to "except: # noqa" - except (Exception, BaseException): + except: # noqa self.current_size -= 1 raise return created diff --git a/test/unit/common/test_memcached.py b/test/unit/common/test_memcached.py index 4c18191238..e0345fdb2b 100644 --- a/test/unit/common/test_memcached.py +++ b/test/unit/common/test_memcached.py @@ -444,11 +444,7 @@ class TestMemcached(unittest.TestCase): while not got: try: got = pool.get() - # This was really supposed to be "except:" but ran afoul - # of the H201 check, which does not implement the "noqa" - # exception. Once that's fixed, the except here can be - # changed to "except: # noqa" - except (Exception, BaseException): + except: # noqa pass pool.put(got)