From d80b8db663fc7f4f852229048594cbbe360b7e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Serdar=20Dalg=C4=B1=C3=A7?= Date: Mon, 14 Dec 2009 13:18:11 +0000 Subject: [PATCH] do not read hardcoded pisi/pisi.conf :) --- pisi/index.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pisi/index.py b/pisi/index.py index 33d9a843..6bd2e394 100644 --- a/pisi/index.py +++ b/pisi/index.py @@ -92,13 +92,12 @@ class Index(xmlfile.XmlFile): pisi.file.File.check_signature(filename, tmpdir) def check_distribution_and_architecture(self, doc): - config = pisi.configfile.ConfigurationFile("/etc/pisi/pisi.conf") - if doc.getTag("Distribution").getTagData("Version") != config.get("general", "distribution_release"): + if doc.getTag("Distribution").getTagData("Version") != ctx.config.values.get("general", "distribution_release"): ctx.ui.error(_("The repository couldn't be added because of distribution release mismatch")) raise DistributionMismatchException # First check if Architecture tag exists in index.xml; if not, directly skip it ;) if doc.getTag("Distribution").getTagData("Architecture"): - if doc.getTag("Distribution").getTagData("Architecture") != config.get("general", "architecture"): + if doc.getTag("Distribution").getTagData("Architecture") != ctx.config.values.get("general", "architecture"): ctx.ui.error(_("The repository couldn't be added because of distribution architecture mismatch")) raise ArchitectureMismatchException