Author: andar
Revision: 5248
Log:
Fix #921 detect if user has json-py installed and add dumps and loads
attributes to it
Diff:
Modified: trunk/deluge/common.py
===================================================================
--- trunk/deluge/common.py 2009-05-09 03:05:43 UTC (rev 5247)
+++ trunk/deluge/common.py 2009-05-09 03:18:54 UTC (rev 5248)
@@ -36,6 +36,12 @@
except ImportError:
import simplejson as json
+# Do a little hack here just in case the user has json-py installed since it
+# has a different api
+if not hasattr(json, "dumps"):
+ json.dumps = json.write
+ json.loads = json.read
+
import pkg_resources
import xdg, xdg.BaseDirectory
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---