6.69. umbra.managers.patchesManager

patchesManager.py

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

Others:

6.69.1. Module Attributes

umbra.managers.patchesManager.LOGGER

6.69.2. Classes

class umbra.managers.patchesManager.Patch(**kwargs)[source]

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')[source]

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[source]

Property for self.__historyFile attribute.

Returns:self.__historyFile.
Return type:unicode
paths[source]

Property for self.__paths attribute.

Returns:self.__paths.
Return type:tuple or list
extension[source]

Property for self.__extension attribute.

Returns:self.__extension.
Return type:unicode
patches[source]

Property for self.__patches attribute.

Returns:self.__patches.
Return type:dict
get(patch, default=None)[source]

Returns given patch value.

Parameters:
  • patch (unicode) – Patch name.
  • default (object) – Default value if patch is not found.
Returns:

Action.

Return type:

QAction

listPatches()[source]

Returns the registered patches.

Returns:Patches list.
Return type:list
isPatchRegistered(patch)[source]

Returns if the given patch is registered.

Parameters:patch (unicode) – Patch.
Returns:Is patch registered.
Return type:bool
registerPatch(name, path)[source]

Registers given patch.

Parameters:
Returns:

Method success.

Return type:

bool

registerPatches()[source]

Registers the patches.

Returns:Method success.
Return type:bool
applyPatch(patch)[source]

Applies given patch.

Parameters:patch (Patch) – Patch.
Returns:Method success.
Return type:bool
applyPatches()[source]

Applies the patches.

Returns:Method success.
Return type:bool
getPatchFromUid(uid)[source]

Returns the patch with given uid.

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