From caa07e7fabb03948c1b052c9e518221df4b57b2f Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 1 Jun 2013 12:29:03 -0400 Subject: [PATCH] pep8 fixes --- library/cloud/quantum_floating_ip | 2 +- library/database/riak | 6 +++--- library/system/setup | 6 ++++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/library/cloud/quantum_floating_ip b/library/cloud/quantum_floating_ip index d7b4bfafa14..22c00f7c052 100644 --- a/library/cloud/quantum_floating_ip +++ b/library/cloud/quantum_floating_ip @@ -161,7 +161,7 @@ def _create_floating_ip(quantum, module, port_id, net_id): result = quantum.create_floatingip({'floatingip': kwargs}) except Exception as e: module.fail_json(msg="There was an error in updating the floating ip address: %s" % e.message) - module.exit_json(changed=True, result=result, public_ip=result['floatingip']['floating_ip_address'] ) + module.exit_json(changed=True, result=result, public_ip=result['floatingip']['floating_ip_address']) def _get_net_id(quantum, module): kwargs = { diff --git a/library/database/riak b/library/database/riak index ea99dff1225..78c99fb4593 100644 --- a/library/database/riak +++ b/library/database/riak @@ -144,7 +144,7 @@ def main(): # here we attempt to get stats from the http stats interface for 120 seconds. timeout = time.time() + 120 while True: - if time.time () > timeout: + if time.time() > timeout: module.fail_json(msg='Timeout, could not fetch Riak stats.') try: stats_raw = urllib2.urlopen( @@ -230,7 +230,7 @@ def main(): result['handoffs'] = 'No transfers active.' break time.sleep(10) - if time.time () > timeout: + if time.time() > timeout: module.fail_json(msg='Timeout waiting for handoffs.') # this could take a while, recommend to run in async mode @@ -247,7 +247,7 @@ def main(): break time.sleep(10) wait += 10 - if time.time () > timeout: + if time.time() > timeout: module.fail_json(msg='Timeout waiting for nodes to agree on ring.') result['ring_ready'] = ring_check() diff --git a/library/system/setup b/library/system/setup index 0315a351dad..6c075c032e8 100644 --- a/library/system/setup +++ b/library/system/setup @@ -1608,8 +1608,10 @@ class SunOSNetwork(GenericBsdIfconfigNetwork, Network): else: current_if = interfaces[device] flags = self.get_options(words[1]) - if 'IPv4' in flags: v = 'ipv4' - if 'IPv6' in flags: v = 'ipv6' + if 'IPv4' in flags: + v = 'ipv4' + if 'IPv6' in flags: + v = 'ipv6' current_if[v].append({'flags': flags, 'mtu': words[3]}) current_if['macaddress'] = 'unknown' # will be overwritten later return current_if