Remove repositories if not exist

This commit is contained in:
Dimitris Zlatanidis 2015-06-23 02:02:56 +03:00
parent 07ed83e605
commit 55bf9b05d6

View file

@ -93,6 +93,9 @@ class ArgParse(object):
elif (len(self.args) == 2 and self.args[0] == "update" and
self.args[1].startswith("--only=")):
repos = self.args[1].split("=")[-1].split(",")
for rp in repos:
if rp not in self.meta.repositories:
repos.remove(rp)
Update().repository(repos)
else:
usage("")