Commit dbdb131
committed
Narrow exception handling in load_yaml_file
Replace the broad except Exception with specific catches for
yaml.YAMLError, AnsibleError (vault decryption), and OSError
(file I/O). Unexpected exceptions now propagate to the caller,
which is the Pythonic convention -- all callers already have their
own except Exception safety nets with context-appropriate messages.
AI-assisted: Claude Code
Signed-off-by: Roger Luethi <luethi@osism.tech>1 parent 9d25b3e commit dbdb131
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
117 | 121 | | |
118 | 122 | | |
119 | 123 | | |
| |||
0 commit comments