From cc6eb736ca4613d70c3f7ff30317af340ca70bb7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 1 Aug 2006 00:04:31 +0200 Subject: * UpdateManager/Common/aptsources.py: - added NullMatcher and a "withMatcher" argument --- DistUpgrade/DistUpgradeControler.py | 2 +- UpdateManager/Common/aptsources.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py index 9ad95d3f..9842484d 100644 --- a/DistUpgrade/DistUpgradeControler.py +++ b/DistUpgrade/DistUpgradeControler.py @@ -143,7 +143,7 @@ class DistUpgradeControler(object): def updateSourcesList(self): logging.debug("updateSourcesList()") - self.sources = SourcesList() + self.sources = SourcesList(withMatcher=False) if not self.rewriteSourcesList(mirror_check=True): logging.error("No valid mirror found") res = self._view.askYesNoQuestion(_("No valid mirror found"), diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index fce06c2b..3d317b15 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -204,11 +204,17 @@ class SourceEntry: return line # the SourceList file as a class +class NullMatcher(object): + def match(self, s): + return True + class SourcesList: def __init__(self, withMatcher=True): self.list = [] # of Type SourceEntries if withMatcher: self.matcher = SourceEntryMatcher() + else: + self.matcher = NullMatcher() self.refresh() def refresh(self): -- cgit v1.2.3