def __virtual__():
    '''
    Only load if subversion is available
    '''
    if __virtualname__ not in __opts__['fileserver_backend']:
        return False
    if not HAS_SVN:
        log.error('Subversion fileserver backend is enabled in configuration '
                  'but could not be loaded, is pysvn installed?')
        return False
    errors = []
    for param in ('svnfs_trunk', 'svnfs_branches', 'svnfs_tags'):
        if os.path.isabs(__opts__[param]):
            errors.append(
                'Master configuration parameter \'{0}\' (value: {1}) cannot '
                'be an absolute path'.format(param, __opts__[param])
            )
    if errors:
        for error in errors:
            log.error(error)
        log.error('Subversion fileserver backed will be disabled')
        return False
    return __virtualname__
def __virtual__ ( ) : if __virtualname__ not in __opts__ [ 'fileserver_backend' ] : return False if not HAS_SVN : log . error ( 'Subversion fileserver backend is enabled in configuration ' 'but could not be loaded, is pysvn installed?' ) return False errors = [ ] for param in ( 'svnfs_trunk' , 'svnfs_branches' , 'svnfs_tags' ) : if os . path . isabs ( __opts__ [ param ] ) : errors . append ( 'Master configuration parameter \'{0}\' (value: {1}) cannot ' 'be an absolute path' . format ( param , __opts__ [ param ] ) ) if errors : for error in errors : log . error ( error ) log . error ( 'Subversion fileserver backed will be disabled' ) return False return __virtualname__
Only load if subversion is available