combox

split and encrypted files between online file storage providers
git clone git://git.ricketyspace.net/combox.git
Log | Files | Refs

commit c9a5290224dd7254a23cb6e5e3baa43a21fd2362
parent 9448a121130bfd7964b3d08e19799538ae189374
Author: Siddharth Ravikumar <sravik@bgsu.edu>
Date:   Fri, 13 Feb 2015 11:11:02 -0500

tests/utils.py: added new function rm_nodedirs.

rm_nodedirs purges the node directories. This function will be used
later to remove the test node directories.

Diffstat:
tests/utils.py | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/tests/utils.py b/tests/utils.py @@ -22,7 +22,7 @@ from nose.tools import * from os import path, remove, rmdir from combox.config import config_cb, get_nodedirs -from combox.file import relative_path +from combox.file import relative_path, purge_dir def get_input_func(): """Returns the input function @@ -57,6 +57,17 @@ def get_config(): return config_cb(config_dir, pass_func, input_func, write=False) +def rm_nodedirs(config): + """Removes node directories""" + nodes = get_nodedirs(config) + for node in nodes: + try: + purge_dir(node) + rmdir(node) + except OSError, e: + print "Problem deleting", node, e + + def shardedp(f): """Checks if file's shards exists in the node directories"""