You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by je...@apache.org on 2011/01/04 02:28:12 UTC
svn commit: r1054852 - /incubator/libcloud/trunk/test/test_brightbox.py
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