mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Remove redundant SaltInvocationError raises
Also add a missing exception message in an earlier check.
This commit is contained in:
parent
644f003fb2
commit
38d715ec0a
1 changed files with 2 additions and 14 deletions
|
@ -2011,7 +2011,8 @@ def merge_base(cwd,
|
|||
|
||||
if all_ and (independent or is_ancestor or fork_point):
|
||||
raise SaltInvocationError(
|
||||
|
||||
'The \'all\' argument is not compatible with \'independent\', '
|
||||
'\'is_ancestor\', or \'fork_point\''
|
||||
)
|
||||
|
||||
if refs is None:
|
||||
|
@ -2026,25 +2027,12 @@ def merge_base(cwd,
|
|||
'Only one of \'octopus\', \'independent\', \'is_ancestor\', and '
|
||||
'\'fork_point\' is permitted'
|
||||
)
|
||||
elif independent:
|
||||
if all_:
|
||||
raise SaltInvocationError(
|
||||
'\'all\' is not compatible with \'independent\''
|
||||
)
|
||||
elif is_ancestor:
|
||||
if all_:
|
||||
raise SaltInvocationError(
|
||||
'\'all\' is not compatible with \'is_ancestor\''
|
||||
)
|
||||
if len(refs) != 2:
|
||||
raise SaltInvocationError(
|
||||
'Two refs/commits are required if \'is_ancestor\' is True'
|
||||
)
|
||||
elif fork_point:
|
||||
if all_:
|
||||
raise SaltInvocationError(
|
||||
'\'all\' is not compatible with \'fork_point\''
|
||||
)
|
||||
if len(refs) > 1:
|
||||
raise SaltInvocationError(
|
||||
'At most one ref/commit can be passed if \'fork_point\' is '
|
||||
|
|
Loading…
Add table
Reference in a new issue