summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-08-01 00:04:31 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-08-01 00:04:31 +0200
commitcc6eb736ca4613d70c3f7ff30317af340ca70bb7 (patch)
tree05b0a98e57d23b14d25c2795d58fd5a6c65ba953
parentf19441a3a7a206c306e9a78bed6d034226034136 (diff)
downloadpython-apt-cc6eb736ca4613d70c3f7ff30317af340ca70bb7.tar.gz
* UpdateManager/Common/aptsources.py:
- added NullMatcher and a "withMatcher" argument
-rw-r--r--DistUpgrade/DistUpgradeControler.py2
-rw-r--r--UpdateManager/Common/aptsources.py6
2 files changed, 7 insertions, 1 deletions
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):