pw_presubmit: Ignore dirs for banned words check Bug: 386 Change-Id: I0df336feb01efb2d1fc03b11f0f828092491a5d4 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/46362 Pigweed-Auto-Submit: Rob Mohr <mohrr@google.com> Reviewed-by: Joe Ethier <jethier@google.com> Commit-Queue: Auto-Submit <auto-submit@pigweed.google.com.iam.gserviceaccount.com>
diff --git a/pw_presubmit/py/pw_presubmit/banned_words.py b/pw_presubmit/py/pw_presubmit/banned_words.py index f0812ac..8c789e6 100644 --- a/pw_presubmit/py/pw_presubmit/banned_words.py +++ b/pw_presubmit/py/pw_presubmit/banned_words.py
@@ -115,7 +115,7 @@ # Not using 'continue' so this line always executes. prev = line - except UnicodeDecodeError: + except (UnicodeDecodeError, IsADirectoryError): # File is not text, like a gif. pass