Commit ec184af
committed
fix: move disk space check parsing inside try-except block
The parsing code for df output was outside the try-except block, causing
uncaught exceptions to bubble up and return UNKNOWN status instead of
HEALTHY or CRITICAL. Moving the parsing logic inside the try-except block
ensures proper error handling and correct status reporting.
Fixes test failures:
- TestDiskSpaceCheck.test_disk_space_check_run
- TestDiskSpaceCheck.test_disk_space_high_requirement1 parent 490bf82 commit ec184af
1 file changed
Lines changed: 7 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
164 | 171 | | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
168 | 175 | | |
169 | 176 | | |
170 | 177 | | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | 178 | | |
180 | 179 | | |
181 | 180 | | |
| |||
0 commit comments