summaryrefslogtreecommitdiff
path: root/DistUpgrade
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-25 12:45:53 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-25 12:45:53 +0200
commitd8c288d928da41fae20947b7dd2064740c2593b3 (patch)
treee00d94e7c77b45f8ac9792a9c80a68e2a2391d7c /DistUpgrade
parent3790683bfbc3f5f4135d4c05989396c07152b8b7 (diff)
downloadpython-apt-d8c288d928da41fae20947b7dd2064740c2593b3.tar.gz
* DistUpgrade/DistUpgradeControler.py:
- check for self.sources,self.aptcdrom before using it
Diffstat (limited to 'DistUpgrade')
-rw-r--r--DistUpgrade/DistUpgradeControler.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index f9c4c0dd..e32c0c5f 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -551,8 +551,10 @@ class DistUpgradeControler(object):
def abort(self):
""" abort the upgrade, cleanup (as much as possible) """
- self.sources.restoreBackup(self.sources_backup_ext)
- self.aptcdrom.restoreBackup(self.sources_backup_ext)
+ if hasattr(self, sources):
+ self.sources.restoreBackup(self.sources_backup_ext)
+ if hasattr(self, aptcdrom):
+ self.aptcdrom.restoreBackup(self.sources_backup_ext)
# generate a new cache
self._view.updateStatus(_("Restoring original system state"))
self._view.abort()