diff options
| author | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-13 05:56:50 -0700 |
|---|---|---|
| committer | Yuriy Andamasov <yuriy@vyos.io> | 2026-05-13 05:56:50 -0700 |
| commit | d004a2b5caa9b819d93af897b1c218a2f3197c8b (patch) | |
| tree | 946ca55b473841615fa77e61847f9995acb0b350 /src/migration-scripts | |
| parent | f1a412985288730cc65a250da2bd4f5b87ade43f (diff) | |
| download | vyos-1x-d004a2b5caa9b819d93af897b1c218a2f3197c8b.tar.gz vyos-1x-d004a2b5caa9b819d93af897b1c218a2f3197c8b.zip | |
python: T8857: replace bare except clauses with except Exception in config scripts
Bare except: catches everything derived from BaseException, including
SystemExit and KeyboardInterrupt. Config scripts must not silently
continue past sys.exit(), so replace bare except: with except Exception:
in the three config-mode scripts that contained one.
Library code (python/vyos/configverify.py, python/vyos/config.py) and
op-mode scripts are intentionally out of scope: those cases require
case-by-case design review (e.g. MTU lookups should accept defaults as
arguments rather than rely on exception handling; reset-style op-mode
scripts may legitimately want to ignore KeyboardInterrupt).
Sites changed:
- src/conf_mode/interfaces_ethernet.py (MTU adapter lookup)
- src/conf_mode/vpp_interfaces_bonding.py (MAC validation)
- src/conf_mode/container.py x2 (IPv4 / IPv6 prefix lookup)
Diffstat (limited to 'src/migration-scripts')
0 files changed, 0 insertions, 0 deletions
