summaryrefslogtreecommitdiff
path: root/UpdateManager/DistUpgradeFetcher.py
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-02-28 23:31:30 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2006-02-28 23:31:30 +0100
commit011227402396588da9688bec6dc0fdb9271bfef9 (patch)
tree94205064818d3b28ae0f68e1a57087352dd2f2e2 /UpdateManager/DistUpgradeFetcher.py
parentf913be5ba0d7501e4e54b353c1a2a0b9d4802c78 (diff)
downloadpython-apt-011227402396588da9688bec6dc0fdb9271bfef9.tar.gz
* use shutils.rmtree()
Diffstat (limited to 'UpdateManager/DistUpgradeFetcher.py')
-rw-r--r--UpdateManager/DistUpgradeFetcher.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py
index 676f064b..42ad19fe 100644
--- a/UpdateManager/DistUpgradeFetcher.py
+++ b/UpdateManager/DistUpgradeFetcher.py
@@ -27,6 +27,7 @@ import apt_pkg
import tarfile
import urllib2
import tempfile
+import shutils
import GnuPGInterface
from gettext import gettext as _
@@ -184,14 +185,7 @@ class DistUpgradeFetcher(object):
# cleanup
os.chdir("..")
# del tmpdir
- for root, dirs, files in os.walk(self.tmpdir, topdown=False):
- for name in files:
- os.remove(os.path.join(root, name))
- #print "would remove file: %s" % os.path.join(root, name)
- for name in dirs:
- os.rmdir(os.path.join(root, name))
- #print "would remove dir: %s" % os.path.join(root, name)
- os.rmdir(self.tmpdir)
+ shutils.rmtree(self.tmpdir)
def run(self):
# see if we have release notes