mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix gitfs/git_pillar/winrepo provider to allow lowercase values
This was an unintended side effect of the rewrite. This fix will restore the previous (and intended) behavior.
This commit is contained in:
parent
64125de6c7
commit
49ec61d58b
1 changed files with 8 additions and 1 deletions
|
@ -111,7 +111,7 @@ def failhard(role):
|
|||
|
||||
class GitProvider(object):
|
||||
'''
|
||||
Base class for gitfs/git_pillar provider classes Should never be used
|
||||
Base class for gitfs/git_pillar provider classes. Should never be used
|
||||
directly.
|
||||
|
||||
self.provider should be set in the sub-class' __init__ function before
|
||||
|
@ -1971,6 +1971,13 @@ class GitBase(object):
|
|||
elif self.verify_dulwich(quiet=True):
|
||||
self.provider = 'dulwich'
|
||||
else:
|
||||
# Ensure non-lowercase providers work
|
||||
try:
|
||||
desired_provider = desired_provider.lower()
|
||||
except AttributeError:
|
||||
# Should only happen if someone does something silly like
|
||||
# set the provider to a numeric value.
|
||||
desired_provider = str(desired_provider).lower()
|
||||
if desired_provider not in self.valid_providers:
|
||||
log.critical(
|
||||
'Invalid {0}_provider \'{1}\'. Valid choices are: {2}'
|
||||
|
|
Loading…
Add table
Reference in a new issue