summaryrefslogtreecommitdiff
path: root/DistUpgrade/DistUpgradeControler.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-23 00:12:57 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-23 00:12:57 +0200
commitba58baea53b70a3a6604c2671b7a97585d7dbd3d (patch)
tree7292fa9c869d2f7cf61bce493826c435f70b3fc9 /DistUpgrade/DistUpgradeControler.py
parentbd5dc1971ab94c31d721d0df442b41e3eab2aca0 (diff)
downloadpython-apt-ba58baea53b70a3a6604c2671b7a97585d7dbd3d.tar.gz
* DistUpgrade/DistUpgradeControler.py:
- get the with,without-network argument passing right
Diffstat (limited to 'DistUpgrade/DistUpgradeControler.py')
-rw-r--r--DistUpgrade/DistUpgradeControler.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 2d36e9cc..bcb54553 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -107,7 +107,10 @@ class DistUpgradeControler(object):
self._view.updateStatus(_("Reading cache"))
self.cache = None
- self.useNetwork = getattr(self.options,"withNetwork",True)
+ if self.options.withNetwork == None:
+ self.useNetwork = True
+ else:
+ self.useNetwork = self.options.withNetwork
self.aptcdrom = AptCdrom(distUpgradeView, options.cdromPath)
# the configuration
@@ -140,7 +143,7 @@ class DistUpgradeControler(object):
return False
# FIXME: we may try to find out a bit more about the network
# connection here and ask more inteligent questions
- if self.aptcdrom and not hasattr(self.options, "witheNetwork"):
+ if self.aptcdrom and self.options.withNetwork == None:
res = self._view.askYesNoQuestion(_("Fetch data from the network for the upgrade?"),
_("The upgrade can use the network to check "
"the latest updates and to fetch packages that are not on the "
@@ -602,6 +605,7 @@ class DistUpgradeControler(object):
if match:
uri = match.group(1) + path
apt_pkg.GetPkgAcqFile(fetcher, uri=uri,
+ size=ver.Size,
descr=_("Fetching backport of '%s'" % pkgname))
res = fetcher.Run()
if res != fetcher.ResultContinue: