summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/Action.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Client/Tools/Action.py')
-rw-r--r--src/lib/Client/Tools/Action.py16
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':