libcloud-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject svn commit: r1054852 - /incubator/libcloud/trunk/test/test_brightbox.py
Date Tue, 04 Jan 2011 01:28:12 GMT
Author: jerry
Date: Tue Jan  4 01:28:11 2011
New Revision: 1054852

URL: http://svn.apache.org/viewvc?rev=1054852&view=rev
Log:
Properly catch ImportError for 'json' and attempt to import simplejson in test/test_brightbox

Modified:
    incubator/libcloud/trunk/test/test_brightbox.py

Modified: incubator/libcloud/trunk/test/test_brightbox.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/test/test_brightbox.py?rev=1054852&r1=1054851&r2=1054852&view=diff
==============================================================================
--- incubator/libcloud/trunk/test/test_brightbox.py (original)
+++ incubator/libcloud/trunk/test/test_brightbox.py Tue Jan  4 01:28:11 2011
@@ -12,7 +12,12 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-import sys, unittest, httplib, json
+import sys, unittest, httplib
+
+try:
+    import json
+except ImportError:
+    import simplejson as json
 
 from libcloud.drivers.brightbox import BrightboxNodeDriver
 from libcloud.types import NodeState, InvalidCredsError



Mime
View raw message