bare excepts, as is proper
Change-Id: Ifd28f6f14a781a67644315690491888161a7250c
This commit is contained in:
parent
9248c91f6d
commit
71d1805683
@ -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
|
||||
|
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user