mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixes #19673
It was checking if start or end was False. None, 0, and '' evaluate to False so 0 was being evaluated as an invalid parameter for start and end. Changed it to specifically check for None and ''. 0 is a valid value for start and end.
This commit is contained in:
parent
ab18dcf637
commit
ae8fbb208f
1 changed files with 1 additions and 1 deletions
|
@ -470,7 +470,7 @@ def mkpart(device, part_type, fs_type=None, start=None, end=None):
|
|||
'''
|
||||
_validate_device(device)
|
||||
|
||||
if not start or not end:
|
||||
if start in [None, ''] or end in [None, '']:
|
||||
raise CommandExecutionError(
|
||||
'partition.mkpart requires a start and an end'
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue