summaryrefslogtreecommitdiff
path: root/scripts/IceStormUtil.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/IceStormUtil.py')
-rw-r--r--scripts/IceStormUtil.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/IceStormUtil.py b/scripts/IceStormUtil.py
index ae38e14480c..dc903ce578c 100644
--- a/scripts/IceStormUtil.py
+++ b/scripts/IceStormUtil.py
@@ -24,12 +24,15 @@ class IceStorm(ProcessFromBinDir, Server):
def setup(self, current):
# Create the database directory
- os.mkdir(os.path.join(current.testcase.getPath(), "{0}-{1}.db".format(self.instanceName, self.replica)))
+ self.dbdir = os.path.join(current.testcase.getPath(), "{0}-{1}.db".format(self.instanceName, self.replica))
+ if os.path.exists(self.dbdir):
+ shutil.rmtree(self.dbdir)
+ os.mkdir(self.dbdir)
def teardown(self, current, success):
# Remove the database directory tree
try:
- shutil.rmtree(os.path.join(current.testcase.getPath(), "{0}-{1}.db".format(self.instanceName, self.replica)))
+ shutil.rmtree(self.dbdir)
except:
pass