diff options
author | Tomas Touceda <chiiph@gentoo.org> | 2011-06-21 23:57:11 -0300 |
---|---|---|
committer | Tomas Touceda <chiiph@gentoo.org> | 2011-06-21 23:57:11 -0300 |
commit | 2ca16b64ac00ce6375e3828d334979e5b7abf098 (patch) | |
tree | 6ae576db6a428f38df87955a7addffa13e800892 /lib/thandy/util.py | |
parent | ba87d47619e73663d3a1475f954451c5ac8047ca (diff) |
First part of makethppackage
Creates its metadata based on a config file.
This still needs a sanity check.
Diffstat (limited to 'lib/thandy/util.py')
-rw-r--r-- | lib/thandy/util.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/thandy/util.py b/lib/thandy/util.py index 29c7b87..606d6c0 100644 --- a/lib/thandy/util.py +++ b/lib/thandy/util.py @@ -217,3 +217,10 @@ def logCtrl(key, **args): "%s=%s"%(k, formatLogString(v)) for k,v in sorted(args.iteritems())) _controlLog.log(logging.INFO, " ".join(parts)) +def deltree(top): + for dirpath, dirnames, filenames in os.walk(top, topdown=False): + for f in filenames: + os.unlink(os.path.join(dirpath, f)) + for d in dirnames: + os.rmdir(os.path.join(dirpath, d)) + os.rmdir(top) |