Browse Source

Code cleanups

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac349@3016 e5f2f494-b856-4b98-b285-d166d9295462
Michal Vaner 14 years ago
parent
commit
b3b5034448
1 changed files with 7 additions and 2 deletions
  1. 7 2
      src/lib/python/isc/config/ccsession.py

+ 7 - 2
src/lib/python/isc/config/ccsession.py

@@ -175,13 +175,18 @@ class ModuleCCSession(ConfigData):
         """Close the session to the command channel"""
         """Close the session to the command channel"""
         self._session.close()
         self._session.close()
 
 
-    def check_command(self, nonblock = True):
+    def check_command(self, nonblock=True):
         """Check whether there is a command or configuration update
         """Check whether there is a command or configuration update
            on the channel. Call the corresponding callback function if
            on the channel. Call the corresponding callback function if
            there is. This function does a read on the cc session, and
            there is. This function does a read on the cc session, and
            returns nothing. It will respond to any command by either
            returns nothing. It will respond to any command by either
            an error or the answer message returned by the callback,
            an error or the answer message returned by the callback,
-           unless the latter is None."""
+           unless the latter is None.
+
+           If nonblock is True, it just checks if there's a command
+           and does nothing if there isn't. If nonblock is False, it
+           waits until it arrives. It temporarily sets timeout to infinity,
+           because commands may not come in arbitrary long time."""
         timeout_orig = self._session.get_timeout()
         timeout_orig = self._session.get_timeout()
         self._session.set_timeout(0)
         self._session.set_timeout(0)
         try:
         try: