Make transport methods private

These methods are private to the library, so we're prefixing them
with an underscore even though it's a bit unconventional.

See the discussion here:

  https://github.com/markmc/oslo-incubator/pull/3
This commit is contained in:
Mark McLoughlin 2013-05-10 15:48:48 +01:00
parent ea2e34f37a
commit d588b49cd0
3 changed files with 4 additions and 4 deletions

View File

@ -56,7 +56,7 @@ class _CallContext(object):
def cast(self, method, **kwargs):
msg = self._make_message(method, kwargs)
self.transport.send(target, msg)
self.transport._send(target, msg)
def _check_for_lock():
if not self.conf.debug:

View File

@ -49,7 +49,7 @@ class MessageHandlingServer(object):
def start():
if self._executor is not None:
return
listener = self.transport.listen(self.target)
listener = self.transport._listen(self.target)
self._executor = self._executor_cls(self.conf, listener,
self.dispatcher)
self._executor.start()

View File

@ -52,12 +52,12 @@ class Transport(object):
self.conf = driver.conf
self._driver = driver
def send(self, target, message, wait_for_reply=None, timeout=None):
def _send(self, target, message, wait_for_reply=None, timeout=None):
return self._driver.send(target, message,
wait_for_reply=wait_for_reply,
timeout=timeout)
def listen(self, target):
def _listen(self, target):
return self._driver.listen(target)