* better error message when repo not found

This commit is contained in:
Eray Özkural
2005-12-08 23:39:28 +00:00
parent 0fd6bd7c65
commit a4f698136e
+4 -2
View File
@@ -267,10 +267,12 @@ def remove_repo(name):
% name)
def update_repo(repo):
ctx.ui.info(_('* Updating repository: %s') % repo)
index = Index()
index.read_uri(ctx.repodb.get_repo(repo).indexuri.get_uri(), repo)
if ctx.repodb.has_repo(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)
ctx.ui.info(_('\n* Package database updated.'))