pyworker: empty flags are valid

Summary: Empty flags can be sent by Mercurial, do not error out in that case.

Reviewed By: quark-zju

Differential Revision: D20450124

fbshipit-source-id: c85af42be2afb95b09057583f6fec3a2a13d478a
This commit is contained in:
Xavier Deguillard 2020-03-13 19:34:45 -07:00 committed by Facebook GitHub Bot
parent a07c1b6e77
commit fc51908dba

View File

@ -406,6 +406,8 @@ py_class!(class writerworker |py| {
Some(UpdateFlag::Symlink)
} else if flags == "x" {
Some(UpdateFlag::Executable)
} else if flags == "" {
None
} else {
return Err(format_err!("Unknown flags: {}", flags)).map_pyerr(py);
};