summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-22 09:37:48 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-03-22 09:37:48 -0400
commit26567899f7095e9404254d1430f1d87456d3fb41 (patch)
tree6e0e399b118a89fda4f8c3d7fea89231cbe6d687 /src
parentaa9c78201cdba651b5e8c8ebbbdb66f4153dbe72 (diff)
downloadbcfg2-26567899f7095e9404254d1430f1d87456d3fb41.tar.gz
bcfg2-26567899f7095e9404254d1430f1d87456d3fb41.tar.bz2
bcfg2-26567899f7095e9404254d1430f1d87456d3fb41.zip
SvcTool: fixed some docstrings, code with new Executor
Diffstat (limited to 'src')
-rw-r--r--src/lib/Bcfg2/Client/Tools/__init__.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/lib/Bcfg2/Client/Tools/__init__.py b/src/lib/Bcfg2/Client/Tools/__init__.py
index 48fbbed52..c5a5ee4d6 100644
--- a/src/lib/Bcfg2/Client/Tools/__init__.py
+++ b/src/lib/Bcfg2/Client/Tools/__init__.py
@@ -524,8 +524,8 @@ class SvcTool(Tool):
:param service: The service entry to modify
:type service: lxml.etree._Element
- :returns: tuple - The return value from
- :class:`Bcfg2.Client.Tools.Executor.run`
+ :returns: Bcfg2.Utils.ExecutorResult - The return value from
+ :class:`Bcfg2.Utils.Executor.run`
"""
self.logger.debug('Starting service %s' % service.get('name'))
return self.cmd.run(self.get_svc_command(service, 'start'))
@@ -535,8 +535,8 @@ class SvcTool(Tool):
:param service: The service entry to modify
:type service: lxml.etree._Element
- :returns: tuple - The return value from
- :class:`Bcfg2.Client.Tools.Executor.run`
+ :returns: Bcfg2.Utils.ExecutorResult - The return value from
+ :class:`Bcfg2.Utils.Executor.run`
"""
self.logger.debug('Stopping service %s' % service.get('name'))
return self.cmd.run(self.get_svc_command(service, 'stop'))
@@ -546,8 +546,8 @@ class SvcTool(Tool):
:param service: The service entry to modify
:type service: lxml.etree._Element
- :returns: tuple - The return value from
- :class:`Bcfg2.Client.Tools.Executor.run`
+ :returns: Bcfg2.Utils.ExecutorResult - The return value from
+ :class:`Bcfg2.Utils.Executor.run`
"""
self.logger.debug('Restarting service %s' % service.get('name'))
restart_target = service.get('target', 'restart')
@@ -561,7 +561,7 @@ class SvcTool(Tool):
:returns: bool - True if the status command returned 0, False
otherwise
"""
- return self.cmd.run(self.get_svc_command(service, 'status')).success
+ return bool(self.cmd.run(self.get_svc_command(service, 'status')))
def Remove(self, services):
if self.setup['servicemode'] != 'disabled':