You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by pq...@apache.org on 2010/01/06 00:42:14 UTC

svn commit: r896275 - /incubator/libcloud/trunk/libcloud/drivers/gogrid.py

Author: pquerna
Date: Tue Jan  5 23:42:13 2010
New Revision: 896275

URL: http://svn.apache.org/viewvc?rev=896275&view=rev
Log:
Use the same json loading as everywhere else

Modified:
    incubator/libcloud/trunk/libcloud/drivers/gogrid.py

Modified: incubator/libcloud/trunk/libcloud/drivers/gogrid.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/gogrid.py?rev=896275&r1=896274&r2=896275&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/gogrid.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/gogrid.py Tue Jan  5 23:42:13 2010
@@ -24,10 +24,11 @@
 import time
 import urllib
 import md5, hashlib
-try:
-    import simplejson as json
-except:
-    import json
+
+# JSON is included in the standard library starting with Python 2.6.  For 2.5
+# and 2.4, there's a simplejson egg at: http://pypi.python.org/pypi/simplejson
+try: import json
+except: import simplejson as json
 
 HOST = 'api.gogrid.com'
 PORTS_BY_SECURITY = { True: 443, False: 80 }