diff options
author | Daniil Baturin <daniil@baturin.org> | 2024-07-17 11:45:35 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2024-07-17 11:45:35 +0100 |
commit | 33ae19a57dc12ffb38973de5666b428e11187602 (patch) | |
tree | 3dedbe75601c95f3fefccbd5450bdacd958fdfa6 /src/op_mode/zone.py | |
parent | e9232c7a751ffec34f18e1734cb18ac01da35cb7 (diff) | |
download | vyos-1x-33ae19a57dc12ffb38973de5666b428e11187602.tar.gz vyos-1x-33ae19a57dc12ffb38973de5666b428e11187602.zip |
op-mode: T6586: add a distinct exception for unconfigured objects
as opposed to entire subsystems
Diffstat (limited to 'src/op_mode/zone.py')
-rw-r--r-- | src/op_mode/zone.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/op_mode/zone.py b/src/op_mode/zone.py index d24b1065b..49fecdf28 100644 --- a/src/op_mode/zone.py +++ b/src/op_mode/zone.py @@ -104,7 +104,7 @@ def _convert_config(zones_config: dict, zone: str = None) -> list: if zones_config: output = [_convert_one_zone_data(zone, zones_config)] else: - raise vyos.opmode.DataUnavailable(f'Zone {zone} not found') + raise vyos.opmode.UnconfiguredObject(f'Zone {zone} not found') else: if zones_config: output = _convert_zones_data(zones_config) @@ -212,4 +212,4 @@ if __name__ == '__main__': print(res) except (ValueError, vyos.opmode.Error) as e: print(e) - sys.exit(1)
\ No newline at end of file + sys.exit(1) |