Warn if repo added but index not updated or when index file does not exist... RepoError is parse error and is indeed
an exception.
This commit is contained in:
@@ -115,6 +115,10 @@ class RepoDB(lazydb.LazyDB):
|
|||||||
if index_path.endswith("bz2"):
|
if index_path.endswith("bz2"):
|
||||||
index_path = index_path.split(".bz2")[0]
|
index_path = index_path.split(".bz2")[0]
|
||||||
|
|
||||||
|
if not os.path.exists(index_path):
|
||||||
|
ctx.ui.warning("%s repository needs to be updated" % repo_name)
|
||||||
|
return piksemel.newDocument("PISI")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
return piksemel.parse(index_path)
|
return piksemel.parse(index_path)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
|
|||||||
Reference in New Issue
Block a user