Clarify error message from /source/new
This commit is contained in:
parent
7e8245abcc
commit
b20aa4609c
@ -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:
|
||||||
# Delete it from yum (if it exists) and replace it with the new one
|
# Delete it from yum (if it exists) and replace it with the new one
|
||||||
|
Loading…
Reference in New Issue
Block a user