mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #24040 from rallytime/bp-24027
Backport #24027 to 2015.5
This commit is contained in:
commit
82de059891
@ -328,7 +328,7 @@ def mod_repo(repo, **kwargs):
|
||||
repo or alias
|
||||
alias by which the zypper refers to the repo
|
||||
|
||||
url or mirrorlist
|
||||
url, mirrorlist or baseurl
|
||||
the URL for zypper to reference
|
||||
|
||||
enabled
|
||||
@ -361,7 +361,7 @@ def mod_repo(repo, **kwargs):
|
||||
|
||||
# An attempt to add new one?
|
||||
if repo not in repos_cfg.sections():
|
||||
url = kwargs.get('url', kwargs.get('mirrorlist'))
|
||||
url = kwargs.get('url', kwargs.get('mirrorlist', kwargs.get('baseurl')))
|
||||
if not url:
|
||||
raise CommandExecutionError(
|
||||
'Repository \'{0}\' not found and no URL passed to create one.'.format(repo))
|
||||
|
Loading…
Reference in New Issue
Block a user