summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-02-01 20:48:53 +0000
committerMatt Wilson <msw@redhat.com>2000-02-01 20:48:53 +0000
commit44d29ea59647c60411688b7dda2c684852cda958 (patch)
tree5f1c543f88d6e65c1192d3d57060561231e0a8d7 /iutil.py
parentf612d58f9e88130dfa8ad92e2a8a4453eb46af88 (diff)
downloadanaconda-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.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index a151eee28..f1f5728d2 100644
--- a/iutil.py
+++ b/iutil.py
@@ -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)
+
+