summaryrefslogtreecommitdiff
path: root/buildscripts/smoke.py
diff options
context:
space:
mode:
authorEric Milkie <milkie@10gen.com>2012-01-25 13:49:52 -0500
committerEric Milkie <milkie@10gen.com>2012-01-25 13:49:52 -0500
commitdf532033b1b295c05c1086494ae87a3cb3de6d7d (patch)
tree7105f196de76314aeee8b66360b54fb3df294004 /buildscripts/smoke.py
parent585ebf9f68f28ced10db178634837006ff9e0f39 (diff)
downloadmongo-df532033b1b295c05c1086494ae87a3cb3de6d7d.tar.gz
Fixing smoke.py enter/exit semantics for "with" replacement
Diffstat (limited to 'buildscripts/smoke.py')
-rwxr-xr-xbuildscripts/smoke.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/buildscripts/smoke.py b/buildscripts/smoke.py
index 2549dd94818..28ad8f870fb 100755
--- a/buildscripts/smoke.py
+++ b/buildscripts/smoke.py
@@ -367,10 +367,10 @@ def run_tests(tests):
# The reason we want to use "with" is so that we get __exit__ semantics
# but "with" is only supported on Python 2.5+
- master = mongod(small_oplog=small_oplog,no_journal=no_journal,no_preallocj=no_preallocj,auth=auth)
+ master = mongod(small_oplog=small_oplog,no_journal=no_journal,no_preallocj=no_preallocj,auth=auth).__enter__()
try:
if small_oplog:
- slave = mongod(slave=True)
+ slave = mongod(slave=True).__enter__()
else:
slave = Nothing()
try:
@@ -400,9 +400,9 @@ def run_tests(tests):
if isinstance(slave, mongod):
check_db_hashes(master, slave)
finally:
- slave.__exit__()
+ slave.__exit__(None, None, None)
finally:
- master.__exit__()
+ master.__exit__(None, None, None)
return 0