| Index: third_party/WebKit/Source/build/scripts/make_css_property_names.py
|
| diff --git a/third_party/WebKit/Source/build/scripts/make_css_property_names.py b/third_party/WebKit/Source/build/scripts/make_css_property_names.py
|
| index 6db3fc48ed5576692e5f49359c0cbad2987d9a2a..887a713a43b3ad502531703ce9aadb433627bbdd 100755
|
| --- a/third_party/WebKit/Source/build/scripts/make_css_property_names.py
|
| +++ b/third_party/WebKit/Source/build/scripts/make_css_property_names.py
|
| @@ -230,8 +230,16 @@ class CSSPropertyNamesWriter(css_properties.CSSProperties):
|
| 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__":
|
|
|