Skip to content

Commit

Permalink
Rename function
Browse files Browse the repository at this point in the history
[ci skip-build-wheels]
  • Loading branch information
gshuflin committed Oct 13, 2020
1 parent b3ab308 commit cf1c62e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1566,7 +1566,7 @@ fn run_local_interactive_process(
if hermetic_env {
command.env_clear();
}
let env = externs::project_frozendict(&value, "env");
let env = externs::collect_frozendict(&value, "env");
command.envs(env);

let mut subprocess = command.spawn().map_err(|e| format!("Error executing interactive process: {}", e.to_string()))?;
Expand Down
2 changes: 1 addition & 1 deletion src/rust/engine/src/externs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ pub fn collect_iterable(value: &PyObject) -> Result<Vec<PyObject>, String> {
}
}

pub fn project_frozendict(value: &PyObject, field: &str) -> BTreeMap<String, String> {
pub fn collect_frozendict(value: &PyObject, field: &str) -> BTreeMap<String, String> {
let frozendict = getattr(value, field).unwrap();
let pydict: PyDict = getattr(&frozendict, "_data").unwrap();
let gil = Python::acquire_gil();
Expand Down
4 changes: 2 additions & 2 deletions src/rust/engine/src/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ impl MultiPlatformExecuteProcess {
value: &Value,
target_platform: PlatformConstraint,
) -> Result<Process, String> {
let env = externs::project_frozendict(&value, "env");
let env = externs::collect_frozendict(&value, "env");

let working_directory = {
let val = externs::project_str(&value, "working_directory");
Expand Down Expand Up @@ -286,7 +286,7 @@ impl MultiPlatformExecuteProcess {
let py_level: PyObject = externs::getattr(&value, "level").unwrap();
let level = externs::val_to_log_level(&py_level)?;

let append_only_caches = externs::project_frozendict(&value, "append_only_caches")
let append_only_caches = externs::collect_frozendict(&value, "append_only_caches")
.into_iter()
.map(|(name, dest)| Ok((CacheName::new(name)?, CacheDest::new(dest)?)))
.collect::<Result<_, String>>()?;
Expand Down

0 comments on commit cf1c62e

Please sign in to comment.