Skip to content

Commit 6878989

Browse files
committed
Merge pull request #341 from tevino/harder-harness
ignore error when removing directory
2 parents 8511483 + c7c6d06 commit 6878989

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

kazoo/testing/common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def client_port(self):
223223
def reset(self):
224224
"""Stop the zookeeper instance, cleaning out its on disk-data."""
225225
self.stop()
226-
shutil.rmtree(os.path.join(self.working_path, "data"))
226+
shutil.rmtree(os.path.join(self.working_path, "data"), True)
227227
os.mkdir(os.path.join(self.working_path, "data"))
228228
with open(os.path.join(self.working_path, "data", "myid"), "w") as fh:
229229
fh.write(str(self.server_info.server_id))
@@ -247,7 +247,7 @@ def destroy(self):
247247
import shutil
248248
self.stop()
249249

250-
shutil.rmtree(self.working_path)
250+
shutil.rmtree(self.working_path, True)
251251

252252

253253
class ZookeeperCluster(object):

0 commit comments

Comments
 (0)