[Concept,04/12] buildman: Use specific exception type in _fixup_arch()

Message ID 20260103203243.3727493-5-sjg@u-boot.org
State New
Headers
Series buildman: Fix pylint warnings in board.py and boards.py |

Commit Message

Simon Glass Jan. 3, 2026, 8:32 p.m. UTC
  From: Simon Glass <simon.glass@canonical.com>

Change bare except to catch AttributeError specifically, which occurs
when the ARCH_RV32I symbol is not found and get() returns None

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---

 tools/buildman/boards.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/tools/buildman/boards.py b/tools/buildman/boards.py
index 9dc5f9158d0..3b132691435 100644
--- a/tools/buildman/boards.py
+++ b/tools/buildman/boards.py
@@ -322,7 +322,7 @@  class KconfigScanner:
         if params['arch'] == 'riscv':
             try:
                 value = self._conf.syms.get('ARCH_RV32I').str_value
-            except:
+            except AttributeError:
                 value = ''
             if value == 'y':
                 params['arch'] = 'riscv32'