CedarBackup2.config.PostActionHook

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

# Class PostActionHook

source code

    object --+
             |
    ActionHook --+
                 |
                PostActionHook

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 post-action hook is executed after the named action.

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.

Instance Methods | [hide private]
__init__(self, action=None, command=None) Constructor for the `PostActionHook` class. | source code
__repr__(self) Official string representation for class instance. | source code
Inherited from `ActionHook`: `__str__`, `__cmp__` Inherited from `ActionHook` (private): `_getAction`, `_getAfter`, `_getBefore`, `_getCommand`, `_setAction`, `_setCommand` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

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