summaryrefslogtreecommitdiff
path: root/src/leap/common/events/daemon.py
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-05-29 05:00:22 +0900
committerKali Kaneko <kali@leap.se>2013-05-29 05:05:09 +0900
commit354467c605f07042568c10c3e931f7fc093c0bf4 (patch)
tree6dd8abad51635726d3a2cb09caabbe14097de07a /src/leap/common/events/daemon.py
parent9c12f4cce20ea1dea7e39cda583cb29ded4b4e1a (diff)
change docstring comments to use sphinx style
Diffstat (limited to 'src/leap/common/events/daemon.py')
-rw-r--r--src/leap/common/events/daemon.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/leap/common/events/daemon.py b/src/leap/common/events/daemon.py
index d2c7b9b..c253948 100644
--- a/src/leap/common/events/daemon.py
+++ b/src/leap/common/events/daemon.py
@@ -50,10 +50,10 @@ class EventsRpcServer(SocketRpcServer):
"""
Initialize a RPC server.
- @param port: the port in which to listen for incoming messages
- @type port: int
- @param host: the address to bind to
- @type host: str
+ :param port: the port in which to listen for incoming messages
+ :type port: int
+ :param host: the address to bind to
+ :type host: str
"""
SocketRpcServer.__init__(self, port, host)
self._server = None
@@ -111,10 +111,10 @@ class EventsSingletonDaemon(threading.Thread):
This is a static method disguised as instance method that actually
does the initialization of the daemon instance.
- @param port: the port in which to listen for incoming messages
- @type port: int
- @param service: the service to provide in this daemon
- @type service: google.protobuf.service.Service
+ :param port: the port in which to listen for incoming messages
+ :type port: int
+ :param service: the service to provide in this daemon
+ :type service: google.protobuf.service.Service
"""
threading.Thread.__init__(self)
self._port = port
@@ -141,11 +141,11 @@ class EventsSingletonDaemon(threading.Thread):
with the appropriate service from the `events.proto` definitions, and
return the daemon instance.
- @param port: the port in which the daemon should be listening
- @type port: int
+ :param port: the port in which the daemon should be listening
+ :type port: int
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
raise NotImplementedError(self.ensure)
@@ -156,11 +156,11 @@ class EventsSingletonDaemon(threading.Thread):
Might return ServiceAlreadyRunningException
- @param port: the port in which the daemon should be listening
- @type port: int
+ :param port: the port in which the daemon should be listening
+ :type port: int
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
daemon = cls(port, service)
if not daemon.is_alive():
@@ -178,8 +178,8 @@ class EventsSingletonDaemon(threading.Thread):
"""
Retrieve singleton instance of this daemon.
- @return: a daemon instance
- @rtype: EventsSingletonDaemon
+ :return: a daemon instance
+ :rtype: EventsSingletonDaemon
"""
return cls.__instance
@@ -200,8 +200,8 @@ class EventsSingletonDaemon(threading.Thread):
Retrieve the value of the port to which the service running in this
daemon is binded to.
- @return: the port to which the daemon is binded to
- @rtype: int
+ :return: the port to which the daemon is binded to
+ :rtype: int
"""
if self._port is 0:
self._port = self._server.port