Chromium Code Reviews| Index: presubmit_support.py |
| diff --git a/presubmit_support.py b/presubmit_support.py |
| index 2922b4e32938c873da53decfc4e646e9b8d73174..84a1f9bcff27a9d07cfc4006688dae4e4c050b90 100755 |
| --- a/presubmit_support.py |
| +++ b/presubmit_support.py |
| @@ -1093,11 +1093,14 @@ def ListRelevantPresubmitFiles(files, root): |
| # Look for PRESUBMIT.py in all candidate directories. |
| results = [] |
| for directory in sorted(list(candidates)): |
| - for f in os.listdir(directory): |
| - p = os.path.join(directory, f) |
| - if os.path.isfile(p) and re.match( |
| - r'PRESUBMIT.*\.py$', f) and not f.startswith('PRESUBMIT_test'): |
| - results.append(p) |
| + try: |
| + for f in os.listdir(directory): |
|
tandrii(chromium)
2016/08/17 10:01:56
the only thing that can raise here is this line, s
|
| + p = os.path.join(directory, f) |
| + if os.path.isfile(p) and re.match( |
| + r'PRESUBMIT.*\.py$', f) and not f.startswith('PRESUBMIT_test'): |
| + results.append(p) |
| + except OSError: |
| + pass |
| logging.debug('Presubmit files: %s', ','.join(results)) |
| return results |