diff options
author | Richard Samuels <richard.l.samuels@gmail.com> | 2021-10-07 18:46:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-09 03:21:59 +0000 |
commit | c83d89bef13f8ddfeda2a5336fec287c590b5c37 (patch) | |
tree | dea42f1c79bf6a13da8576521dee42012f1fb908 | |
parent | 2d512f84a57bcaf3613273bc0ff00d290d4a19a6 (diff) | |
download | mongo-c83d89bef13f8ddfeda2a5336fec287c590b5c37.tar.gz |
SERVER-60523 Standalone fixture incorrectly handles directory creation exceptions
(cherry picked from commit d5010cf9e5b712f96c1a2c6539e303687b202f8a)
-rw-r--r-- | buildscripts/resmokelib/testing/fixtures/standalone.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/buildscripts/resmokelib/testing/fixtures/standalone.py b/buildscripts/resmokelib/testing/fixtures/standalone.py index 19925edb6be..d563a313703 100644 --- a/buildscripts/resmokelib/testing/fixtures/standalone.py +++ b/buildscripts/resmokelib/testing/fixtures/standalone.py @@ -56,11 +56,7 @@ class MongoDFixture(interface.Fixture): if not self.preserve_dbpath and os.path.lexists(self._dbpath): shutil.rmtree(self._dbpath, ignore_errors=False) - try: - os.makedirs(self._dbpath) - except os.error: - # Directory already exists. - pass + os.makedirs(self._dbpath, exist_ok=True) launcher = MongodLauncher(self.fixturelib) # Second return val is the port, which we ignore because we explicitly created the port above. |