Exemplo n.º 1
0
def _get_python_file_config_data(python_file_config, yaml_path):
    return ((
        rebase_file(python_file_config, yaml_path), None, None,
        None) if isinstance(python_file_config, six.string_types) else (
            rebase_file(python_file_config['relative_path'], yaml_path),
            python_file_config.get('attribute'),
            python_file_config.get('location_name'),
            rebase_file(python_file_config.get('working_directory'), yaml_path)
            if python_file_config.get('working_directory') else None,
        ))
Exemplo n.º 2
0
def _get_python_file_config_data(python_file_config, yaml_path):
    return ((
        rebase_file(python_file_config, yaml_path), None, None,
        None) if isinstance(python_file_config, six.string_types) else (
            rebase_file(python_file_config["relative_path"], yaml_path),
            python_file_config.get("attribute"),
            python_file_config.get("location_name"),
            rebase_file(python_file_config.get("working_directory"), yaml_path)
            if python_file_config.get("working_directory") else rebase_file(
                os.path.dirname(yaml_path), yaml_path),
        ))
Exemplo n.º 3
0
def _get_python_file_config_data(python_file_config, yaml_path,
                                 default_executable_path):
    return ((
        rebase_file(python_file_config, yaml_path), None, None, None,
        default_executable_path) if isinstance(python_file_config, str) else (
            rebase_file(python_file_config["relative_path"], yaml_path),
            python_file_config.get("attribute"),
            python_file_config.get("location_name"),
            rebase_file(python_file_config.get("working_directory"), yaml_path)
            if python_file_config.get("working_directory") else rebase_file(
                os.path.dirname(yaml_path), yaml_path),
            _get_executable_path(python_file_config.get("executable_path"),
                                 default_executable_path),
        ))