diff options
author | Victor J. Orlikowski <vjo@duke.edu> | 2016-02-26 12:06:14 -0500 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-02-27 22:07:21 +0900 |
commit | 4a99bb258a6acef3d9c66e4009fb6b4315f03da6 (patch) | |
tree | f0077da7e1f3d28d9842494957e69884a21f951b | |
parent | 1625117fbb33c0a490f0ce97510e4cdff936acea (diff) |
Typo fixes
Signed-off-by: Victor J. Orlikowski <vjo@duke.edu>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r-- | ryu/base/app_manager.py | 4 | ||||
-rw-r--r-- | ryu/controller/controller.py | 8 | ||||
-rw-r--r-- | ryu/lib/hub.py | 34 |
3 files changed, 23 insertions, 23 deletions
diff --git a/ryu/base/app_manager.py b/ryu/base/app_manager.py index 0a35e915..13e41f42 100644 --- a/ryu/base/app_manager.py +++ b/ryu/base/app_manager.py @@ -349,7 +349,7 @@ class RyuApp(object): class AppManager(object): - # singletone + # singleton _instance = None @staticmethod @@ -533,7 +533,7 @@ class AppManager(object): self._close(app) events = app.events if not events.empty(): - app.logger.debug('%s events remians %d', app.name, events.qsize()) + app.logger.debug('%s events remains %d', app.name, events.qsize()) def close(self): def close_all(close_dict): diff --git a/ryu/controller/controller.py b/ryu/controller/controller.py index 9a009446..50c538ec 100644 --- a/ryu/controller/controller.py +++ b/ryu/controller/controller.py @@ -139,7 +139,7 @@ class Datapath(ofproto_protocol.ProtocolDesc): self.close_requested = False # The limit is arbitrary. We need to limit queue size to - # prevent it from eating memory up + # prevent it from eating memory up. self.send_q = hub.Queue(16) self._send_q_sem = hub.BoundedSemaphore(self.send_q.maxsize) @@ -160,8 +160,8 @@ class Datapath(ofproto_protocol.ProtocolDesc): message = ( 'Datapath#ports is kept for compatibility with the previous ' 'openflow versions (< 1.3). ' - 'This not be updated by EventOFPPortStatus message. ' - 'If you want to be updated, you can use ' + 'This is not updated by the EventOFPPortStatus message. ' + 'If you want to be updated, you should use ' '\'ryu.controller.dpset\' or \'ryu.topology.switches\'.' ) warnings.warn(message, stacklevel=2) @@ -252,7 +252,7 @@ class Datapath(ofproto_protocol.ProtocolDesc): self.address, errno, ioe.strerror) finally: q = self.send_q - # first, clear self.send_q to prevent new references. + # First, clear self.send_q to prevent new references. self.send_q = None # Now, drain the send_q, releasing the associated semaphore for each entry. # This should release all threads waiting to acquire the semaphore. diff --git a/ryu/lib/hub.py b/ryu/lib/hub.py index b77465bf..91866599 100644 --- a/ryu/lib/hub.py +++ b/ryu/lib/hub.py @@ -18,8 +18,8 @@ import logging import os -# we don't bother to use cfg.py because monkey patch needs to be -# called very early. instead, we use an environment variable to +# We don't bother to use cfg.py because monkey patch needs to be +# called very early. Instead, we use an environment variable to # select the type of hub. HUB_TYPE = os.getenv('RYU_HUB_TYPE', 'eventlet') @@ -46,16 +46,16 @@ if HUB_TYPE == 'eventlet': def spawn(*args, **kwargs): def _launch(func, *args, **kwargs): - # mimic gevent's default raise_error=False behaviour - # by not propergating an exception to the joiner. + # Mimic gevent's default raise_error=False behaviour + # by not propagating an exception to the joiner. try: func(*args, **kwargs) except TaskExit: pass except: - # log uncaught exception. - # note: this is an intentional divergence from gevent - # behaviour. gevent silently ignores such exceptions. + # Log uncaught exception. + # Note: this is an intentional divergence from gevent + # behaviour; gevent silently ignores such exceptions. LOG.error('hub: uncaught exception: %s', traceback.format_exc()) @@ -63,16 +63,16 @@ if HUB_TYPE == 'eventlet': def spawn_after(seconds, *args, **kwargs): def _launch(func, *args, **kwargs): - # mimic gevent's default raise_error=False behaviour - # by not propergating an exception to the joiner. + # Mimic gevent's default raise_error=False behaviour + # by not propagating an exception to the joiner. try: func(*args, **kwargs) except TaskExit: pass except: - # log uncaught exception. - # note: this is an intentional divergence from gevent - # behaviour. gevent silently ignores such exceptions. + # Log uncaught exception. + # Note: this is an intentional divergence from gevent + # behaviour; gevent silently ignores such exceptions. LOG.error('hub: uncaught exception: %s', traceback.format_exc()) @@ -83,8 +83,8 @@ if HUB_TYPE == 'eventlet': def joinall(threads): for t in threads: - # this try-except is necessary when killing an inactive - # greenthread + # This try-except is necessary when killing an inactive + # greenthread. try: t.wait() except TaskExit: @@ -145,9 +145,9 @@ if HUB_TYPE == 'eventlet': def _broadcast(self): self._ev.send() - # because eventlet Event doesn't allow mutiple send() on an event, - # re-create the underlying event. - # note: _ev.reset() is obsolete. + # Since eventlet Event doesn't allow multiple send() operations + # on an event, re-create the underlying event. + # Note: _ev.reset() is obsolete. self._ev = eventlet.event.Event() def is_set(self): |