Commit aab1de7
committed
fix: fail promise on invalid DNF options
Invalid DNF options are configuration errors and should fail the
promise as NOT_KEPT rather than logging warnings and continuing.
Changes:
- Renamed _try_apply_dnf_options -> _apply_dnf_options
- Removed try/except wrapper inside _apply_dnf_options
- Added try/except in callers to catch ConfigError and return NOT_KEPT
- Added test_invalid_dnf_option_not_kept to verify behavior
This aligns with strict configuration validation - if a user specifies
an invalid option, it's a policy error that should be fixed.1 parent b397223 commit aab1de7
2 files changed
Lines changed: 43 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
375 | 375 | | |
376 | 376 | | |
377 | 377 | | |
378 | | - | |
379 | | - | |
| 378 | + | |
| 379 | + | |
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| |||
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
399 | 392 | | |
400 | 393 | | |
401 | 394 | | |
402 | 395 | | |
403 | 396 | | |
404 | 397 | | |
405 | 398 | | |
406 | | - | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
407 | 404 | | |
408 | 405 | | |
409 | 406 | | |
| |||
483 | 480 | | |
484 | 481 | | |
485 | 482 | | |
486 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
487 | 488 | | |
488 | 489 | | |
489 | 490 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
289 | 317 | | |
290 | 318 | | |
291 | 319 | | |
| |||
0 commit comments