Class PreActionHook
source code
object --+
|
ActionHook --+
|
PreActionHook
Class representing a pre-action hook associated with an action.
A hook associated with an action is a shell command to be executed
either before or after a named action is executed. In this case, a
pre-action hook is executed before the named action.
As with all of the other classes that represent configuration
sections, all of these values are optional. It is up to some
higher-level construct to decide whether everything they need is filled
in. Some validation is done on non-None
assignments
through the use of the Python property()
construct.
The following restrictions exist on data in this class:
-
The action name must be a non-empty string consisting of lower-case
letters and digits.
-
The shell command must be a non-empty string.
The internal before
instance variable is always set to
True in this class.
|
|
|
|
Inherited from ActionHook :
__str__ ,
__cmp__
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|
__init__(self,
action=None,
command=None)
(Constructor)
| source code
|
Constructor for the PreActionHook class.
- Parameters:
action - Action this hook is associated with
command - Shell command to execute
- Raises:
ValueError - If one of the values is invalid.
- Overrides:
object.__init__
|
Official string representation for class instance.
- Overrides:
object.__repr__
|