summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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):