summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Grandi <agrandi@google.com>2022-07-15 12:57:58 -0700
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-07-20 05:09:06 +0000
commitc4235aec3722172488b80816f0ff24ed45a9d353 (patch)
tree3362869387022cb984c155b75caf4d94f06f1020
parentd43c815ee7a12a1fc3c930faf8c003a12f623d82 (diff)
downloadchrome-ec-c4235aec3722172488b80816f0ff24ed45a9d353.tar.gz
run_device_tests.py: Disable pylint error broad-except
Pylint reports an error when generic exception are used: W0703: Catching too general exception Exception (broad-except) This is intentional since we want to ensure all failures in these operations are ignored to avoid disruptions. BUG=b:239100048 TEST=cros lint test/run_device_tests.py BRANCH=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: Id413d4f46626afa805c734b9abcad931852a471e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3766497 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
-rwxr-xr-xtest/run_device_tests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index 001be8a204..6884bed674 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -305,7 +305,7 @@ class AllTests:
for test_args in private_tests.tests:
tests.append(TestConfig(**test_args))
# Catch all exceptions to avoid disruptions in public repo
- except BaseException as e:
+ except BaseException as e: # pylint: disable=broad-except
logging.debug("Failed to get list of private tests: %s", str(e))
logging.debug("Ignore error and continue.")
return []
@@ -761,7 +761,7 @@ def main():
if test.ro_image is not None:
try:
patch_image(test, image_path)
- except Exception as exception:
+ except Exception as exception: # pylint: disable=broad-except
logging.warning(
"An exception occurred while patching " "image: %s", exception
)