Pep8 cleanup
Change-Id: I816723b404d30c467f99af5367b2e2efa643b6a3 Signed-off-by: Rosario Di Somma <rosario.disomma@dreamhost.com>
This commit is contained in:
parent
d95e680d87
commit
9039702c64
@ -154,8 +154,8 @@ class IPDevice(SubProcessBase):
|
||||
self.route = IpRouteCommand(self)
|
||||
|
||||
def __eq__(self, other):
|
||||
return (other is not None and self.name == other.name
|
||||
and self.namespace == other.namespace)
|
||||
return (other is not None and self.name == other.name and
|
||||
self.namespace == other.namespace)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
@ -87,8 +87,9 @@ class LoopingCall(object):
|
||||
break
|
||||
delay = interval - timeutils.delta_seconds(start, end)
|
||||
if delay <= 0:
|
||||
LOG.warn(_('task run outlasted interval by %s sec') %
|
||||
-delay)
|
||||
LOG.warn(
|
||||
_('task run outlasted interval by %s sec') % -delay
|
||||
)
|
||||
greenthread.sleep(delay if delay > 0 else 0)
|
||||
except LoopingCallDone, e:
|
||||
self.stop()
|
||||
|
@ -117,8 +117,8 @@ def _check_for_lock():
|
||||
if not CONF.debug:
|
||||
return None
|
||||
|
||||
if ((hasattr(local.strong_store, 'locks_held')
|
||||
and local.strong_store.locks_held)):
|
||||
if ((hasattr(local.strong_store, 'locks_held') and
|
||||
local.strong_store.locks_held)):
|
||||
stack = ' :: '.join([frame[3] for frame in inspect.stack()])
|
||||
LOG.warn(_('A RPC is being made while holding a lock. The locks '
|
||||
'currently held are %(locks)s. This is probably a bug. '
|
||||
|
@ -179,7 +179,6 @@ class TenantRouterManager(object):
|
||||
return [
|
||||
machine
|
||||
for machine in state_machines
|
||||
if (not machine.deleted
|
||||
and
|
||||
if (not machine.deleted and
|
||||
not self.state_machines.has_been_deleted(machine.router_id))
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user