From f3a73637f1b672070f9ef4e5e6d6f00aad110c29 Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Mon, 26 May 2008 08:14:39 +0000 Subject: [PATCH] Warn if repo added but index not updated or when index file does not exist... RepoError is parse error and is indeed an exception. --- pisi/db/repodb.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pisi/db/repodb.py b/pisi/db/repodb.py index ba5f99bd..f41f8284 100644 --- a/pisi/db/repodb.py +++ b/pisi/db/repodb.py @@ -115,6 +115,10 @@ class RepoDB(lazydb.LazyDB): if index_path.endswith("bz2"): 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: return piksemel.parse(index_path) except Exception, e: