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-07 20:18:01 +0000 |
commit | d5010cf9e5b712f96c1a2c6539e303687b202f8a (patch) | |
tree | e6d575c8d979a5367b311da4880bae3fd935a48d /buildscripts/resmokelib/testing | |
parent | 278a50aef934e0268c261fe72238584cbde7eebb (diff) | |
download | mongo-d5010cf9e5b712f96c1a2c6539e303687b202f8a.tar.gz |
SERVER-60523 Standalone fixture incorrectly handles directory creation exceptions
Diffstat (limited to 'buildscripts/resmokelib/testing')
-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. |