Merge "PEP8 python-novaclient cleanup"

This commit is contained in:
Jenkins 2012-01-10 12:51:13 +00:00 committed by Gerrit Code Review
commit c747f153ec
5 changed files with 6 additions and 5 deletions

View File

@ -37,3 +37,4 @@ Robie Basak <robie.basak@canonical.com>
Sandy Walsh <sandy@darksecretsoftware.com> Sandy Walsh <sandy@darksecretsoftware.com>
Unmesh Gurjar <unmesh.gurjar@vertex.co.in> Unmesh Gurjar <unmesh.gurjar@vertex.co.in>
William Wolf <throughnothing@gmail.com> William Wolf <throughnothing@gmail.com>
Zhongyue Luo <lzyeval@gmail.com>

View File

@ -74,7 +74,7 @@ class Manager(utils.HookableMixin):
data = body[response_key] data = body[response_key]
# NOTE(ja): keystone returns values as list as {'values': [ ... ]} # NOTE(ja): keystone returns values as list as {'values': [ ... ]}
# unlike other services which just return the list... # unlike other services which just return the list...
if type(data) is dict: if isinstance(data, dict):
try: try:
data = data['values'] data = data['values']
except KeyError: except KeyError:

View File

@ -192,7 +192,7 @@ class HTTPClient(httplib2.Http):
magic_tuple = urlparse.urlsplit(self.auth_url) magic_tuple = urlparse.urlsplit(self.auth_url)
scheme, netloc, path, query, frag = magic_tuple scheme, netloc, path, query, frag = magic_tuple
port = magic_tuple.port port = magic_tuple.port
if port == None: if port is None:
port = 80 port = 80
path_parts = path.split('/') path_parts = path.split('/')
for part in path_parts: for part in path_parts:

View File

@ -51,7 +51,7 @@ class QuotaSetManager(base.ManagerWithFind):
'cores': cores}} 'cores': cores}}
for key in body['quota_set'].keys(): for key in body['quota_set'].keys():
if body['quota_set'][key] == None: if body['quota_set'][key] is None:
body['quota_set'].pop(key) body['quota_set'].pop(key)
self._update('/os-quota-sets/%s' % (tenant_id), body) self._update('/os-quota-sets/%s' % (tenant_id), body)

View File

@ -503,7 +503,7 @@ def do_rebuild(cs, args):
server = _find_server(cs, args.server) server = _find_server(cs, args.server)
image = _find_image(cs, args.image) image = _find_image(cs, args.image)
if args.rebuild_password != False: if args.rebuild_password is not False:
_password = args.rebuild_password _password = args.rebuild_password
else: else:
_password = None _password = None
@ -1054,7 +1054,7 @@ def _print_secgroup_rules(rules):
elif k == 'group': elif k == 'group':
k = 'source_group' k = 'source_group'
v = v.get('name') v = v.get('name')
if v == None: if v is None:
v = '' v = ''
setattr(self, k, v) setattr(self, k, v)