]>
Commit | Line | Data |
---|---|---|
f0db7b91 ER |
1 | fix error reporting: |
2 | ||
3 | ... | |
4 | File "chromium/scripts/generate_gyp.py", line 757, in GetIncludedSources | |
5 | exit('Failed to find file', include_file_path) | |
6 | TypeError: __call__() takes at most 2 arguments (3 given) | |
7 | ||
8 | --- ./third_party/ffmpeg/chromium/scripts/generate_gyp.py~ 2015-07-27 07:15:51.000000000 +0300 | |
9 | +++ ./third_party/ffmpeg/chromium/scripts/generate_gyp.py 2015-07-27 07:15:55.928135410 +0300 | |
10 | @@ -79,6 +79,7 @@ | |
11 | import string | |
12 | import subprocess | |
13 | import shutil | |
14 | +import sys | |
15 | ||
16 | COPYRIGHT = """# Copyright %d The Chromium Authors. All rights reserved. | |
17 | # Use of this source code is governed by a BSD-style license that can be | |
18 | @@ -149,6 +150,9 @@ | |
19 | # Mac doesn't have any platform specific files, so just use linux and win. | |
20 | SUPPORTED_PLATFORMS = ['linux', 'win'] | |
21 | ||
22 | +def die(error): | |
23 | + print >> sys.stderr, error | |
24 | + sys.exit(1) | |
25 | ||
26 | def NormalizeFilename(name): | |
27 | """ Removes leading path separators in an attempt to normalize paths.""" | |
28 | @@ -753,7 +757,7 @@ | |
29 | elif include_file_path in IGNORED_INCLUDE_FILES: | |
30 | continue | |
31 | else: | |
32 | - exit('Failed to find file', include_file_path) | |
33 | + die('Failed to find file: ' + include_file_path) | |
34 | ||
35 | # At this point we've found the file. Check if its in our ignore list which | |
36 | # means that the list should be updated to no longer mention this file. | |
37 | @@ -772,7 +776,7 @@ | |
38 | licensecheck_path = os.path.abspath(os.path.join( | |
39 | source_root, 'third_party', 'devscripts', 'licensecheck.pl')); | |
40 | if not os.path.exists(licensecheck_path): | |
41 | - exit('Could not find licensecheck.pl: ' + str(licensecheck_path)) | |
42 | + die('Could not find licensecheck.pl: ' + str(licensecheck_path)) | |
43 | ||
44 | check_process = subprocess.Popen([licensecheck_path, | |
45 | '-l', '100', | |
46 | @@ -838,7 +842,7 @@ | |
47 | ||
48 | # Sanity check: source set should not have any renames prior to this step. | |
49 | if RENAME_PREFIX in basename: | |
50 | - exit('Found unexpected renamed file in SourceSet: %s' % basename) | |
51 | + die('Found unexpected renamed file in SourceSet: %s' % basename) | |
52 | ||
53 | # Craft a new unique basename from the path of the colliding file | |
54 | if basename in known_basenames: | |
55 | @@ -896,7 +900,7 @@ | |
56 | sets = CreatePairwiseDisjointSets(sets) | |
57 | ||
58 | if not sets: | |
59 | - exit('ERROR: failed to find any source sets. ' + | |
60 | + die('ERROR: failed to find any source sets. ' + | |
61 | 'Are build_dir (%s) and/or source_dir (%s) options correct?' % | |
62 | (options.build_dir, options.source_dir)) | |
63 | ||
64 | @@ -904,7 +908,7 @@ | |
65 | ||
66 | if not CheckLicensesForStaticLinking(sets, source_dir, | |
67 | options.print_licenses): | |
68 | - exit ('GENERATE FAILED: invalid licenses detected.') | |
69 | + die('GENERATE FAILED: invalid licenses detected.') | |
70 | print 'License checks passed.' | |
71 | ||
72 | # Open for writing. |