diff options
author | Alan Conway <aconway@apache.org> | 2013-08-06 17:50:04 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2013-08-06 17:50:04 +0000 |
commit | 3c3741e04a44d93661d6d53f38a860508669a30d (patch) | |
tree | 411f101eccba1f4eefab0bf0665aeeefa5cfcc33 | |
parent | 774efef2fc7aa2e8f165b2bf0d57b9dab9cba287 (diff) | |
download | qpid-python-3c3741e04a44d93661d6d53f38a860508669a30d.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/qpid@1511051 13f79535-47bb-0310-9956-ffa450edef68
-rwxr-xr-x | cpp/src/tests/ha_tests.py | 5 |
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): |