* better error message when repo not found
This commit is contained in:
+3
-1
@@ -267,10 +267,12 @@ def remove_repo(name):
|
|||||||
% name)
|
% name)
|
||||||
|
|
||||||
def update_repo(repo):
|
def update_repo(repo):
|
||||||
|
|
||||||
ctx.ui.info(_('* Updating repository: %s') % repo)
|
ctx.ui.info(_('* Updating repository: %s') % repo)
|
||||||
index = Index()
|
index = Index()
|
||||||
|
if ctx.repodb.has_repo(repo):
|
||||||
index.read_uri(ctx.repodb.get_repo(repo).indexuri.get_uri(), repo)
|
index.read_uri(ctx.repodb.get_repo(repo).indexuri.get_uri(), repo)
|
||||||
|
else:
|
||||||
|
raise Error(_('No repository named %s found.') % repo)
|
||||||
index.update_db(repo)
|
index.update_db(repo)
|
||||||
ctx.ui.info(_('\n* Package database updated.'))
|
ctx.ui.info(_('\n* Package database updated.'))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user