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/Action.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/Action.py')
-rw-r--r-- | src/lib/Client/Tools/Action.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/Client/Tools/Action.py b/src/lib/Client/Tools/Action.py index c196f5df4..3610d9015 100644 --- a/src/lib/Client/Tools/Action.py +++ b/src/lib/Client/Tools/Action.py @@ -1,4 +1,4 @@ -'''Action driver''' +"""Action driver""" __revision__ = '$Revision$' import Bcfg2.Client.Tools @@ -9,14 +9,14 @@ import Bcfg2.Client.Tools # => <Action timing='post' when='modified' name='n' command='foo' status='ignore'/> class Action(Bcfg2.Client.Tools.Tool): - '''Implement Actions''' + """Implement Actions""" name = 'Action' __handles__ = [('PostInstall', None), ('Action', None)] __req__ = {'PostInstall': ['name'], 'Action':['name', 'timing', 'when', 'command', 'status']} def RunAction(self, entry): - '''This method handles command execution and status return''' + """This method handles command execution and status return.""" if not self.setup['dryrun']: if self.setup['interactive']: prompt = 'Run Action %s, %s: (y/N): ' % (entry.get('name'), entry.get('command')) @@ -40,15 +40,15 @@ class Action(Bcfg2.Client.Tools.Tool): return False def VerifyAction(self, dummy, _): - '''Actions always verify true''' + """Actions always verify true.""" return True def VerifyPostInstall(self, dummy, _): - '''Actions always verify true''' + """Actions always verify true.""" return True def InstallAction(self, entry): - '''Run actions as pre-checks for bundle installation''' + """Run actions as pre-checks for bundle installation.""" if entry.get('timing') != 'post': return self.RunAction(entry) return True @@ -57,7 +57,7 @@ class Action(Bcfg2.Client.Tools.Tool): return self.InstallAction(self, entry) def BundleUpdated(self, bundle, states): - '''Run postinstalls when bundles have been updated''' + """Run postinstalls when bundles have been updated.""" for postinst in bundle.findall("PostInstall"): self.cmd.run(postinst.get('name')) for action in bundle.findall("Action"): @@ -65,7 +65,7 @@ class Action(Bcfg2.Client.Tools.Tool): states[action] = self.RunAction(action) def BundleNotUpdated(self, bundle, states): - '''Run Actions when bundles have not been updated''' + """Run Actions when bundles have not been updated.""" for action in bundle.findall("Action"): if action.get('timing') in ['post', 'both'] and \ action.get('when') != 'modified': |