| Index: third_party/WebKit/Source/build/scripts/make_css_value_keywords.py
|
| diff --git a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py
|
| index f86922f76afad5f783c9b7826656c850b36aed58..c39804676260e4c1f96f6541af64b3f914b10aa3 100755
|
| --- a/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py
|
| +++ b/third_party/WebKit/Source/build/scripts/make_css_value_keywords.py
|
| @@ -165,8 +165,16 @@ class CSSValueKeywordsWriter(json5_generator.Writer):
|
| gperf_args = [self.gperf_path, '--key-positions=*', '-P', '-n']
|
| gperf_args.extend(['-m', '50']) # Pick best of 50 attempts.
|
| gperf_args.append('-D') # Allow duplicate hashes -> More compact code.
|
| - gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
|
| - return gperf.communicate(gperf_input)[0]
|
| +
|
| + # If gperf isn't in the path we get an OSError. We don't want to use
|
| + # the normal solution of shell=True (as this has to run on many
|
| + # platforms), so instead we catch the error and raise a
|
| + # CalledProcessError like subprocess would do when shell=True is set.
|
| + try:
|
| + gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
|
| + return gperf.communicate(gperf_input)[0]
|
| + except OSError:
|
| + raise subprocess.CalledProcessError(127, gperf_args, output='Command not found.')
|
|
|
|
|
| if __name__ == "__main__":
|
|
|