bgp: fix pep8

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
ISHIDA Wataru 2014-04-21 05:32:34 +00:00 committed by FUJITA Tomonori
parent 8bda92da85
commit 57166dc485
5 changed files with 7 additions and 5 deletions

View File

@ -40,7 +40,7 @@ def start(**kwargs):
waiter = kwargs.pop('waiter')
common_config = CommonConf(**kwargs)
hub.spawn(CORE_MANAGER.start, *[], **{'common_conf': common_config,
'waiter': waiter})
'waiter': waiter})
return True

View File

@ -181,7 +181,7 @@ class Activity(object):
# Schedule to spawn a new greenthread after requested delay
greenthread = hub.spawn_after(seconds, activity.start, *args,
**kwargs)
**kwargs)
self._child_thread_map[activity.name] = greenthread
self._child_activity_map[activity.name] = activity
return greenthread
@ -353,6 +353,7 @@ class Activity(object):
self._spawn(conn_name, conn_handler, sock)
return sock
#
# Sink
#

View File

@ -726,7 +726,7 @@ class Peer(Source, Sink, NeighborConfListener, Activity):
# NeighborConf has this setting we add this to existing list.
communities = path_extcomm_attr.communities
if self._neigh_conf.soo_list:
#construct extended community
# construct extended community
soo_list = self._neigh_conf.soo_list
subtype = 0x03
for soo in soo_list:

View File

@ -425,8 +425,8 @@ class BgpProtocol(Protocol, Activity):
message except for *Open* and *Notification* message. On receiving
*Notification* message we close connection with peer.
"""
LOG.debug('Received msg from %s << %s' % \
(str(self.get_peername()), msg))
LOG.debug('Received msg from %s << %s' % (str(self.get_peername()),
msg))
# If we receive open message we try to bind to protocol
if (msg.type == BGP_MSG_OPEN):

View File

@ -34,6 +34,7 @@ class EventletIOFactory(object):
LOG.debug('create_looping_call called')
return LoopingCall(funct, *args, **kwargs)
# TODO: improve Timer service and move it into framework
class LoopingCall(object):
"""Call a function repeatedly.