Fixes 'not in' operator usage

Fixes bug 1110150

Change-Id: I6c48553564b1809a7ae5de9f778d93dccbe157ae
This commit is contained in:
Zhongyue Luo 2013-01-31 14:26:46 +08:00
parent 65baec39d2
commit c3d4a63021
4 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ Joe Arnold <joe@swiftstack.com> <joe@cloudscaling.com>
Kapil Thangavelu <kapil.foss@gmail.com> kapil.foss@gmail.com <>
Samuel Merritt <sam@swiftstack.com> <spam@andcheese.org>
Morita Kazutaka <morita.kazutaka@gmail.com>
Zhong Yue Luo <lzyeval@gmail.com> lzyeval <lzyeval@gmail.com>
Zhongyue Luo <zhongyue.nah@intel.com> <lzyeval@gmail.com>
Russ Nelson <russ@crynwr.com> <nelson@nelson-laptop>
Marcelo Martins <btorch@gmail.com> <marcelo.martins@rackspace.com>
Andrew Clay Shafer <acs@parvuscaptus.com> <andrew@cloudscaling.com>

View File

@ -55,8 +55,8 @@ Eugene Kirpichov (ekirpichov@gmail.com)
Ed Leafe (ed.leafe@rackspace.com)
Tong Li (litong01@us.ibm.com)
Victor Lowther (victor.lowther@gmail.com)
Zhong Yue Luo (lzyeval@gmail.com)
Christopher MacGown (chris@pistoncloud.com)
Zhongyue Luo (zhongyue.nah@intel.com)
Dragos Manolescu (dragosm@hp.com)
Juan J. Martinez (juan@memset.com)
Marcelo Martins (btorch@gmail.com)

View File

@ -265,7 +265,7 @@ class Controller(object):
:returns: True if error limited, False otherwise
"""
now = time.time()
if not 'errors' in node:
if 'errors' not in node:
return False
if 'last_error' in node and node['last_error'] < \
now - self.app.error_suppression_interval:

View File

@ -87,7 +87,7 @@ def listing_items(method):
class Connection(object):
def __init__(self, config):
for key in 'auth_host auth_port auth_ssl username password'.split():
if not key in config:
if key not in config:
raise SkipTest
self.auth_host = config['auth_host']
@ -301,7 +301,7 @@ class Base:
headers = dict(self.conn.response.getheaders())
ret = {}
for field in fields:
if not field[1] in headers:
if field[1] not in headers:
raise ValueError("%s was not found in response header" %
(field[1]))