A spate of typo fixes.

Signed-off-by: Victor J. Orlikowski <[email protected]>

---
 ryu/base/app_manager.py      |  4 ++--
 ryu/controller/controller.py |  8 ++++----
 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 0a35e91..13e41f4 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 9a00944..50c538e 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 b77465b..9186659 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):
-- 

Best,
Victor
--
Victor J. Orlikowski <> vjo@[cs.]duke.edu

Attachment: 0001-A-spate-of-typo-fixes.patch
Description: 0001-A-spate-of-typo-fixes.patch

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to