Commit 5541be3
committed
fix: handle explicit False for bootable and revertable parameters
Fix boolean parameter checking to distinguish between explicit False and
unset (None) values. Previously, truthy checks treated False the same as
None, causing silent conflicts when:
- Global parameter set to False
- Set-level parameter set to True
The global False was silently ignored instead of raising a conflict error.
Changes:
- Use `module_args.get("param") is not None` instead of `if module_args["param"]:`
- Applies to both snapshot_lvm_bootable and snapshot_lvm_revertable
- Fixed in snapmgr.py (conflict detection) and validate.py (parameter propagation)
This ensures ERROR_BOOTABLE_CONFLICT and ERROR_REVERTABLE_CONFLICT are
correctly raised for all conflicting configurations, not just when the
global value is True.
Signed-off-by: Todd Gill <tgill@redhat.com>1 parent 8162396 commit 5541be3
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | | - | |
| 233 | + | |
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
| |||
0 commit comments