mirror of
https://github.com/facebook/sapling.git
synced 2024-12-27 06:52:23 +03:00
py3: update Rust hgcommands code to pass argv to python as Str
Summary: Update the Rust hgcommands code to pass the command line arguments into the Python logic as `Str` types, so that this will be Unicode `str` objects when using Python 3. Reviewed By: xavierd Differential Revision: D19596739 fbshipit-source-id: 7cdfd44a1c4ce8b0f86d20b634d9b27eab822b2d
This commit is contained in:
parent
2165181562
commit
ad957e7803
@ -92,7 +92,7 @@ impl HgPython {
|
||||
None => fout.clone_ref(py),
|
||||
Some(ref error) => write_to_py_object(py, error),
|
||||
};
|
||||
let args: Vec<Bytes> = args.into_iter().map(Bytes::from).collect();
|
||||
let args: Vec<Str> = args.into_iter().map(Str::from).collect();
|
||||
(args, fin, fout, ferr).to_py_object(py)
|
||||
};
|
||||
entry_point_mod.call(py, "run", call_args, None)?;
|
||||
|
Loading…
Reference in New Issue
Block a user