Package flumotion :: Package worker :: Package checks :: Module check
[hide private]

Module check

source code


Version: $Rev: 7094 $

Classes [hide private]
  CheckProcError
Utility error for element checker procedures
Functions [hide private]
 
handleGStreamerDeviceError(failure, device, mid=None)
Handle common GStreamer GstErrors or other.
source code
 
debugFailure(failure)
Create debug info from a failure.
source code
 
callbackResult(value, result)
I am a callback to add to a do_element_check deferred.
source code
 
errbackResult(failure, result, mid, device)
I am an errback to add to a do_element_check deferred, after your specific one.
source code
 
errbackNotFoundResult(failure, result, mid, device)
I am an errback to add to a do_element_check deferred to check for RESOURCE_ERROR_NOT_FOUND, and add a message to the result.
source code
 
checkImport(moduleName) source code
 
checkElements(elementNames) source code
messages.Result
checkDirectory(pathName)
Check if a path is a directory and that it is readable and executable
source code
messages.Result
checkPlugin(pluginName, packageName, minimumVersion=None, featureName=None, featureCheck=None)
Check if the given plug-in is available.
source code
twisted.internet.defer.Deferred
do_check(obj, callable, *args, **kwargs)
This method can be used in component do_check vmethods.
source code
Function Details [hide private]

handleGStreamerDeviceError(failure, device, mid=None)

source code 

Handle common GStreamer GstErrors or other. Return a message or None.

errbackResult(failure, result, mid, device)

source code 

I am an errback to add to a do_element_check deferred, after your specific one.

I handle several generic cases, including some generic GStreamer errors.

Parameters:
  • mid - the id to set on the message

errbackNotFoundResult(failure, result, mid, device)

source code 

I am an errback to add to a do_element_check deferred to check for RESOURCE_ERROR_NOT_FOUND, and add a message to the result.

Parameters:
  • mid - the id to set on the message

checkDirectory(pathName)

source code 

Check if a path is a directory and that it is readable and executable

Parameters:
  • pathName (string) - path to check
Returns: messages.Result
if the path is a directory and readable

checkPlugin(pluginName, packageName, minimumVersion=None, featureName=None, featureCheck=None)

source code 

Check if the given plug-in is available. Return a result with an error if it is not, or not new enough.

Parameters:
  • pluginName - name of the plugin to check
  • packageName - name of the package to tell the user to install if the check fails
  • minimumVersion - minimum version of the plugin, as a tuple. Optional.
  • featureName - name of a specific feature to check for in the plugin. Optional. Overrides the minimum version check, if given.
  • featureCheck - function to call on the found feature, which should return a boolean representing whether the feature is good or not. Optional, and only makes sense if you specify featureName.
Returns: messages.Result

do_check(obj, callable, *args, **kwargs)

source code 

This method can be used in component do_check vmethods. It will add messages from the result to the UI state.

Parameters:
  • obj - an object having a addMessage method
  • callable - a callable which returns a deferred method returning a Result.
Returns: twisted.internet.defer.Deferred