diff options
author | Benoit Foucher <benoit@zeroc.com> | 2016-12-06 10:31:14 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2016-12-06 10:31:14 +0100 |
commit | 13ed2137508897d5b447f7874bf9795f1929e45b (patch) | |
tree | 4d0a75351ea09eabddca4b5c3d37a0a563df56ce /scripts/IceGridUtil.py | |
parent | Do not generate import libraries with Python builds (diff) | |
download | ice-13ed2137508897d5b447f7874bf9795f1929e45b.tar.bz2 ice-13ed2137508897d5b447f7874bf9795f1929e45b.tar.xz ice-13ed2137508897d5b447f7874bf9795f1929e45b.zip |
Fixes for Windows failures
Diffstat (limited to 'scripts/IceGridUtil.py')
-rw-r--r-- | scripts/IceGridUtil.py | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/scripts/IceGridUtil.py b/scripts/IceGridUtil.py index 66ebd23a62d..e0444e858b4 100644 --- a/scripts/IceGridUtil.py +++ b/scripts/IceGridUtil.py @@ -69,14 +69,15 @@ class IceGridNode(ProcessFromBinDir, Server): def setup(self, current): # Create the database directory - os.mkdir(os.path.join(current.testcase.getPath(), "node-{0}".format(self.name))) + self.dbdir = os.path.join(current.testcase.getPath(), "node-{0}".format(self.name)) + 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(), "node-{0}".format(self.name))) - except: - pass + if success: + shutil.rmtree(self.dbdir) def getProps(self, current): props = { @@ -120,14 +121,15 @@ class IceGridRegistry(ProcessFromBinDir, Server): def setup(self, current): # Create the database directory - os.mkdir(os.path.join(current.testcase.getPath(), "registry-{0}".format(self.name))) + self.dbdir = os.path.join(current.testcase.getPath(), "registry-{0}".format(self.name)) + 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(), "registry-{0}".format(self.name))) - except: - pass + if success: + shutil.rmtree(self.dbdir) def getProps(self, current): props = { |