diff options
author | Matt Wilson <msw@redhat.com> | 2000-02-01 20:48:53 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-02-01 20:48:53 +0000 |
commit | 44d29ea59647c60411688b7dda2c684852cda958 (patch) | |
tree | 5f1c543f88d6e65c1192d3d57060561231e0a8d7 /iutil.py | |
parent | f612d58f9e88130dfa8ad92e2a8a4453eb46af88 (diff) | |
download | anaconda-44d29ea59647c60411688b7dda2c684852cda958.tar.gz anaconda-44d29ea59647c60411688b7dda2c684852cda958.tar.xz anaconda-44d29ea59647c60411688b7dda2c684852cda958.zip |
o upgrade code rebuilds the db to a tmp dir and opens that db to
calculate the upgrade set. When the user OKs the upgrade, the old
db is deleted and the new rebuilt db is moved into place.
o lilo/fstab checks for testing mode.
o added a iutil.rmrf() function to recursively remove directories
Diffstat (limited to 'iutil.py')
-rw-r--r-- | iutil.py | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -207,3 +207,15 @@ def findtz(basepath, relpath): tzdata.sort() return tzdata + +def rmrf (path): + # this is only the very simple case. + files = os.listdir (path) + for file in files: + if os.path.isdir(path + '/' + file): + rmrf (path + '/' + file) + else: + os.unlink (path + '/' + file) + os.rmdir (path) + + |