summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcpp/src/tests/ha_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/tests/ha_tests.py b/cpp/src/tests/ha_tests.py
index e1ad5cc4fa..c3577ca626 100755
--- a/cpp/src/tests/ha_tests.py
+++ b/cpp/src/tests/ha_tests.py
@@ -1288,7 +1288,10 @@ class StoreTests(BrokerTest):
cluster[1].assert_browse_backup("q2", ["hello", "end"])
def open_read(name):
- with open(name) as f: return f.read()
+ try:
+ f = open(name)
+ return f.read()
+ finally: f.close()
class TransactionTests(BrokerTest):