Clarify error message from /source/new
(cherry picked from commitb20aa4609c
) (cherry picked from commit816f1658db
)
This commit is contained in:
parent
1de67f4f63
commit
5993802bc6
@ -1443,7 +1443,7 @@ def v0_api(api):
|
|||||||
|
|
||||||
system_sources = get_repo_sources("/etc/yum.repos.d/*.repo")
|
system_sources = get_repo_sources("/etc/yum.repos.d/*.repo")
|
||||||
if source["name"] in system_sources:
|
if source["name"] in system_sources:
|
||||||
return jsonify(status=False, errors=["%s is a system source, it cannot be deleted." % source["name"]]), 400
|
return jsonify(status=False, errors=["%s is a system source, it cannot be changed." % source["name"]]), 400
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# Remove it from the RepoDict (NOTE that this isn't explicitly supported by the DNF API)
|
# Remove it from the RepoDict (NOTE that this isn't explicitly supported by the DNF API)
|
||||||
|
Loading…
Reference in New Issue
Block a user