summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-10-13 18:48:59 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-10-13 18:48:59 +0200
commit70019d57e2877ea7c3847d13ffea4378d4a8e9ff (patch)
treefe92a0d829f1aaea6460efbba8aef9183c2cdc62
parentd1b8c72ce90713b807bc231b949494e19867b789 (diff)
downloadpython-apt-70019d57e2877ea7c3847d13ffea4378d4a8e9ff.tar.gz
* DistUpgrade/DistUpgradeControler.py:
- check for existance of cdroms.list before making a backup
-rw-r--r--DistUpgrade/Changelog2
-rw-r--r--DistUpgrade/DistUpgradeControler.py3
2 files changed, 4 insertions, 1 deletions
diff --git a/DistUpgrade/Changelog b/DistUpgrade/Changelog
index d86f520f..36d064d6 100644
--- a/DistUpgrade/Changelog
+++ b/DistUpgrade/Changelog
@@ -1,3 +1,5 @@
+2006-10-12:
+ - check if cdrom.lst actually exists before copying it
2006-10-11:
- keep pixbuf loader reference around so that we
have one after the upgrade when the old
diff --git a/DistUpgrade/DistUpgradeControler.py b/DistUpgrade/DistUpgradeControler.py
index 7b35f3c8..bd7f64c8 100644
--- a/DistUpgrade/DistUpgradeControler.py
+++ b/DistUpgrade/DistUpgradeControler.py
@@ -60,7 +60,8 @@ class AptCdrom(object):
if backup_ext:
cdromstate = os.path.join(apt_pkg.Config.FindDir("Dir::State"),
apt_pkg.Config.Find("Dir::State::cdroms"))
- shutil.copy(cdromstate, cdromstate+backup_ext)
+ if os.path.exists(cdromstate):
+ shutil.copy(cdromstate, cdromstate+backup_ext)
# do the actual work
apt_pkg.Config.Set("Acquire::cdrom::mount",self.cdrompath)
apt_pkg.Config.Set("APT::CDROM::NoMount","true")