diff options
author | Fabian Affolter <fabian@bernewireless.net> | 2010-06-07 13:23:13 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2010-06-07 08:42:53 -0500 |
commit | 97063d26e56b7dccf73ec548e82ccd101d8cbd83 (patch) | |
tree | a91bc7e585d2277061ce72d1ee92eb3b0598a212 /src/lib/Client/Tools/Upstart.py | |
parent | 7e63c759095bd90c6aff7b7ebcafe2535e27b7cd (diff) | |
download | bcfg2-97063d26e56b7dccf73ec548e82ccd101d8cbd83.tar.gz bcfg2-97063d26e56b7dccf73ec548e82ccd101d8cbd83.tar.bz2 bcfg2-97063d26e56b7dccf73ec548e82ccd101d8cbd83.zip |
Updated files to match PEP 257
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5897 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/Upstart.py')
-rw-r--r-- | src/lib/Client/Tools/Upstart.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/Client/Tools/Upstart.py b/src/lib/Client/Tools/Upstart.py index b6e68d549..12d82488d 100644 --- a/src/lib/Client/Tools/Upstart.py +++ b/src/lib/Client/Tools/Upstart.py @@ -1,4 +1,4 @@ -'''Upstart support for Bcfg2''' +"""Upstart support for Bcfg2.""" __revision__ = '$Revision$' import glob @@ -9,7 +9,7 @@ import Bcfg2.Client.XML class Upstart(Bcfg2.Client.Tools.SvcTool): - '''Upstart service support for Bcfg2''' + """Upstart service support for Bcfg2.""" name = 'Upstart' __execs__ = ['/lib/init/upstart-job', '/sbin/initctl', @@ -22,13 +22,13 @@ class Upstart(Bcfg2.Client.Tools.SvcTool): return "/usr/sbin/service %s %s" % (service.get('name'), action) def VerifyService(self, entry, _): - '''Verify Service status for entry + """Verify Service status for entry Verifying whether or not the service is enabled can be done at the file level with upstart using the contents of /etc/init/servicename.conf. All we need to do is make sure the service is running when it should be. - ''' + """ try: output = self.cmd.run('/usr/sbin/service %s status' % \ entry.get('name'))[1][0] @@ -58,7 +58,7 @@ class Upstart(Bcfg2.Client.Tools.SvcTool): return status def InstallService(self, entry): - '''Install Service for entry''' + """Install Service for entry.""" if entry.get('mode', 'default') == 'supervised': pstatus, pout = self.cmd.run('/usr/sbin/service %s status' % \ entry.get('name')) @@ -67,7 +67,7 @@ class Upstart(Bcfg2.Client.Tools.SvcTool): return True def FindExtra(self): - '''Locate extra Upstart services''' + """Locate extra Upstart services.""" specified = [entry.get('name') for entry in self.getSupportedEntries()] extra = [] for name in [self.svcre.match(fname).group('name') for fname in |