conduit r1830 - in trunk: . conduit/modules/FacebookModule conduit/modules/FacebookModule/pyfacebook
- From: jstowers svn gnome org
- To: svn-commits-list gnome org
- Subject: conduit r1830 - in trunk: . conduit/modules/FacebookModule conduit/modules/FacebookModule/pyfacebook
- Date: Fri, 23 Jan 2009 01:59:41 +0000 (UTC)
Author: jstowers
Date: Fri Jan 23 01:59:41 2009
New Revision: 1830
URL: http://svn.gnome.org/viewvc/conduit?rev=1830&view=rev
Log:
2009-01-23 John Stowers <john stowers gmail com>
* conduit/modules/FacebookModule/FacebookModule.py:
Print the chosen facebook parsing method
* conduit/modules/FacebookModule/pyfacebook/__init__.py:
Make facebook json selection better by applying patch at
http://code.google.com/p/pyfacebook/issues/detail?id=104
Modified:
trunk/ChangeLog
trunk/conduit/modules/FacebookModule/FacebookModule.py
trunk/conduit/modules/FacebookModule/pyfacebook/__init__.py
Modified: trunk/conduit/modules/FacebookModule/FacebookModule.py
==============================================================================
--- trunk/conduit/modules/FacebookModule/FacebookModule.py (original)
+++ trunk/conduit/modules/FacebookModule/FacebookModule.py Fri Jan 23 01:59:41 2009
@@ -28,6 +28,7 @@
MODULES = {}
else:
log.info("Module Information: %s" % Utils.get_module_information(pyfacebook, 'VERSION'))
+ log.info("Facebook parsing using: %s (%s)" % (pyfacebook.RESPONSE_FORMAT, getattr(pyfacebook, "JSON_MODULE", "N/A")))
MODULES = {
"FacebookSink" : { "type": "dataprovider" }
}
Modified: trunk/conduit/modules/FacebookModule/pyfacebook/__init__.py
==============================================================================
--- trunk/conduit/modules/FacebookModule/pyfacebook/__init__.py (original)
+++ trunk/conduit/modules/FacebookModule/pyfacebook/__init__.py Fri Jan 23 01:59:41 2009
@@ -60,16 +60,23 @@
RESPONSE_FORMAT = 'JSON'
try:
import json as simplejson
-except ImportError:
+ simplejson.loads
+ JSON_MODULE = "json"
+except (ImportError, AttributeError):
try:
import simplejson
- except ImportError:
+ simplejson.loads
+ JSON_MODULE = "simplejson"
+ except (ImportError, AttributeError):
try:
from django.utils import simplejson
- except ImportError:
+ simplejson.loads
+ JSON_MODULE = "django.utils.simplejson"
+ except (ImportError, AttributeError):
try:
import jsonlib as simplejson
simplejson.loads
+ JSON_MODULE = "jsonlib"
except (ImportError, AttributeError):
from xml.dom import minidom
RESPONSE_FORMAT = 'XML'
@@ -1061,7 +1068,7 @@
if next is not None:
args['next'] = next
-
+
if canvas is True:
args['canvas'] = 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]