[PATCH i-g-t v3 5/6] tools/intel-gfx-fw-info: do not use bare 'except'
Lucas De Marchi
lucas.demarchi at intel.com
Mon Aug 26 15:26:55 UTC 2024
>From flake8:
tools/intel-gfx-fw-info:137:1: E722 do not use bare 'except'
Now it passes clean with --ignore=E101,E501,W191 - those ignores are
needed because they are triggering in the C string we use, CDEF, and
flake8 can't bother enabling/disabling warnings per block.
Acked-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
Reviewed-by: Gustavo Sousa <gustavo.sousa at intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
tools/intel-gfx-fw-info | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/intel-gfx-fw-info b/tools/intel-gfx-fw-info
index 8fcb2961a..fb98f1bcc 100755
--- a/tools/intel-gfx-fw-info
+++ b/tools/intel-gfx-fw-info
@@ -84,11 +84,11 @@ logging.basicConfig(format="%(levelname)s: %(message)s")
try:
from dissect import cstruct
-except:
+except ImportError as e:
logging.critical(
"Could not import dissect.cstruct module. See https://github.com/fox-it/dissect.cstruct for installation options"
)
- raise SystemExit(1)
+ raise SystemExit(1) from e
def ffs(x: int) -> int:
--
2.43.0
More information about the igt-dev
mailing list