summaryrefslogtreecommitdiffstats
path: root/combox/file.py
diff options
context:
space:
mode:
authorSiddharth Ravikumar <sravik@bgsu.edu>2015-03-04 20:32:45 -0500
committerSiddharth Ravikumar <sravik@bgsu.edu>2015-03-04 20:32:45 -0500
commit7c612e9520aa7d1c41e0aa9eafc0cf00cebb7180 (patch)
tree886cc3859ff97e8e565c698ffcb56e42089aba95 /combox/file.py
parentc5722f75454eb42ac9fe5cda79fb25f839c3092c (diff)
new function combox.file.rm_dir
also wrote test for it. modified: combox/file.py modified: tests/file_test.py
Diffstat (limited to 'combox/file.py')
-rw-r--r--combox/file.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/combox/file.py b/combox/file.py
index d7602e9..43ce5af 100644
--- a/combox/file.py
+++ b/combox/file.py
@@ -129,6 +129,14 @@ def rm_nodedir(directory, config):
print e, "Something wrong. report bug to sravik@bgsu.edu"
+def rm_dir(directory):
+ """Removes directory"""
+ try:
+ os.rmdir(directory)
+ except OSError, e:
+ print e, "Something wrong. report bug to sravik@bgsu.edu"
+
+
def move_nodedir(src, dest, config):
"""
Moves directory `directory' inside the nodes from old to new location.