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