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:
Faik Uygur
2008-05-26 08:14:39 +00:00
parent 71771090c4
commit f3a73637f1
+4
View File
@@ -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: