summaryrefslogtreecommitdiff
path: root/qpid/cpp/src
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2013-08-06 17:50:04 +0000
committerAlan Conway <aconway@apache.org>2013-08-06 17:50:04 +0000
commitad9872dd53863d8caf65ee903a2c6acf29358e98 (patch)
treef4dc9f0201de7f564b107f7ca91c014ec1de0331 /qpid/cpp/src
parent046522f950f78c478a1e0dba621e361b989c9d5d (diff)
downloadqpid-python-ad9872dd53863d8caf65ee903a2c6acf29358e98.tar.gz
NO-JIRA: Remove use of "with" statement to support older versions of Python
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1511051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
-rwxr-xr-xqpid/cpp/src/tests/ha_tests.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/ha_tests.py b/qpid/cpp/src/tests/ha_tests.py
index e1ad5cc4fa..c3577ca626 100755
--- a/qpid/cpp/src/tests/ha_tests.py
+++ b/qpid/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):