4.34. umbra.managers.patchesManager — Umbra 1.0.9 documentation

# 4.34. umbra.managers.patchesManager

patchesManager.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  Defines the `PatchesManager` and `Patches` classes.

Others:

## 4.34.1. Module Attributes

`umbra.managers.patchesManager.` `LOGGER`

## 4.34.2. Classes

class `umbra.managers.patchesManager.` `Patch`(**kwargs)

  Bases: `foundations.dataStructures.Structure`

  Defines a storage object for `PatchesManager` class patch.

  Initializes the class.

  Parameters: | **kwargs (dict) – name, path, module, apply, uid.

class `umbra.managers.patchesManager.` `PatchesManager`(historyFile=None, paths=None, extension=u'py')

  Bases: `object`

  Defines the Application patches manager.

  Initializes the class.

  Parameters: | historyFile (unicode) – Patches history file. paths (tuple or list) – Patches paths. extension (unicode) – Patches extension.

  `historyFile`

    Property for self.__historyFile attribute.

    Returns: | self.__historyFile.
    Return type: | unicode

  `paths`

    Property for self.__paths attribute.

    Returns: | self.__paths.
    Return type: | tuple or list

  `extension`

    Property for self.__extension attribute.

    Returns: | self.__extension.
    Return type: | unicode

  `patches`

    Property for self.__patches attribute.

    Returns: | self.__patches.
    Return type: | dict

  `get`(patch, default=None)

    Returns given patch value.

    Parameters: | patch (unicode) – Patch name. default (object) – Default value if patch is not found.
    Returns: | Action.
    Return type: | QAction

  `listPatches`()

    Returns the registered patches.

    Returns: | Patches list.
    Return type: | list

  `isPatchRegistered`(patch)

    Returns if the given patch is registered.

    Parameters: | patch (unicode) – Patch.
    Returns: | Is patch registered.
    Return type: | bool

  `registerPatch`(name, path)

    Registers given patch.

    Parameters: | name (unicode) – Patch name. path (unicode) – Patch path.
    Returns: | Method success.
    Return type: | bool

  `registerPatches`()

    Registers the patches.

    Returns: | Method success.
    Return type: | bool

  `applyPatch`(patch)

    Applies given patch.

    Parameters: | patch (Patch) – Patch.
    Returns: | Method success.
    Return type: | bool

  `applyPatches`()

    Applies the patches.

    Returns: | Method success.
    Return type: | bool

  `getPatchFromUid`(uid)

    Returns the patch with given uid.

    Parameters: | uid (unicode) – Patch uid.
    Returns: | Patch.
    Return type: | Patch