From ad9872dd53863d8caf65ee903a2c6acf29358e98 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 6 Aug 2013 17:50:04 +0000 Subject: 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 --- qpid/cpp/src/tests/ha_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qpid/cpp/src') 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): -- cgit v1.2.1