Chromium Code Reviews| Index: win_toolchain/get_toolchain_if_necessary.py |
| diff --git a/win_toolchain/get_toolchain_if_necessary.py b/win_toolchain/get_toolchain_if_necessary.py |
| index d7d20b820354009696bee0cdb6c17d49fbeba65b..4e676327e222c576152834f060351ae9a0336a99 100755 |
| --- a/win_toolchain/get_toolchain_if_necessary.py |
| +++ b/win_toolchain/get_toolchain_if_necessary.py |
| @@ -140,16 +140,22 @@ def CalculateHash(root, expected_hash): |
| timestamps_data_files.append(f[0]) |
| missing_files = [f for f in timestamps_data_files if f not in file_list] |
| if len(missing_files): |
| - print ('Some files are missing from the %s version of the toolchain:' % |
| - expected_hash) |
| - for f in missing_files: |
| - print '\t%s' % f |
| + print ('%d file%s missing from the %s version of the toolchain:' % |
| + (len(missing_files), 's are' if len(missing_files) > 1 else '', |
|
Nico
2016/06/23 15:53:45
nit: i'd just say "%d files missing", it's not lik
Sébastien Marchand
2016/06/23 15:57:51
Done.
|
| + expected_hash)) |
| + for i in xrange(0, min(len(missing_files), 10)): |
| + print '\t%s' % missing_files[i] |
| + if len(missing_files) > 10: |
| + print '\t...' |
| extra_files = [f for f in file_list if f not in timestamps_data_files] |
| if len(extra_files): |
| - print ('There\'s some extra files in the %s version of the toolchain:' % |
| - expected_hash) |
| - for f in extra_files: |
| - print '\t%s' % f |
| + print ('There\'s %d extra file%s in the %s version of the toolchain:' % |
|
Nico
2016/06/23 15:53:44
same nit: drop "There's", and i'd always just say
Sébastien Marchand
2016/06/23 15:57:51
Done.
|
| + (len(extra_files), 's' if len(missing_files) > 1 else '', |
| + expected_hash)) |
| + for i in xrange(0, min(len(extra_files), 10)): |
| + print '\t%s' % extra_files[i] |
| + if len(extra_files) > 10: |
| + print '\t...' |
| if matches: |
| return timestamps_data['sha1'] |