qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1511051 - /qpid/trunk/qpid/cpp/src/tests/ha_tests.py
Date Tue, 06 Aug 2013 17:50:04 GMT
Author: aconway
Date: Tue Aug  6 17:50:04 2013
New Revision: 1511051

URL: http://svn.apache.org/r1511051
Log:
NO-JIRA: Remove use of "with" statement to support older versions of Python

Modified:
    qpid/trunk/qpid/cpp/src/tests/ha_tests.py

Modified: qpid/trunk/qpid/cpp/src/tests/ha_tests.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ha_tests.py?rev=1511051&r1=1511050&r2=1511051&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/ha_tests.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/ha_tests.py Tue Aug  6 17:50:04 2013
@@ -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):
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message