style: Convert GenerateServoCSSPropList.py to py3.

Differential Revision: https://phabricator.services.mozilla.com/D70308
This commit is contained in:
Mike Hommey 2020-04-09 11:03:02 +00:00 committed by Emilio Cobos Álvarez
parent 87139a3ea2
commit 07c1b39637
6 changed files with 29 additions and 25 deletions

View file

@ -28,11 +28,11 @@ mod build_gecko {
}
lazy_static! {
pub static ref PYTHON: String = env::var("PYTHON").ok().unwrap_or_else(|| {
pub static ref PYTHON: String = env::var("PYTHON3").ok().unwrap_or_else(|| {
let candidates = if cfg!(windows) {
["python2.7.exe", "python27.exe", "python.exe"]
["python3.exe"]
} else {
["python2.7", "python2", "python"]
["python3"]
};
for &name in &candidates {
if Command::new(name)
@ -45,7 +45,7 @@ lazy_static! {
}
}
panic!(
"Can't find python (tried {})! Try fixing PATH or setting the PYTHON env var",
"Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
candidates.join(", ")
)
});