Package CedarBackup2 :: Module config :: Class PreActionHook
[hide private]
[frames] | no frames]

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 internal before instance variable is always set to True in this class.

Instance Methods [hide private]
 
__init__(self, action=None, command=None)
Constructor for the PreActionHook class.
source code
 
__repr__(self)
Official string representation for class instance.
source code

Inherited from ActionHook: __str__, __cmp__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]

Inherited from ActionHook: action, command, before, after

Inherited from object: __class__

Method Details [hide private]

__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__

__repr__(self)
(Representation operator)

source code 

Official string representation for class instance.

Overrides: object.__repr__