Use simplejson first, and centralize import
simplejson is supposed to be faster: http://stackoverflow.com/questions/712791/json-and-simplejson-module-differences-in-python
This commit is contained in:
parent
7c0bcfe499
commit
b8d1a52732
7 changed files with 36 additions and 30 deletions
|
|
@ -22,14 +22,9 @@ import urllib
|
|||
import datetime
|
||||
|
||||
from weboob.tools.browser import BaseBrowser, BrowserIncorrectPassword
|
||||
from weboob.tools.json import json as simplejson
|
||||
from weboob.capabilities.content import Revision
|
||||
|
||||
try:
|
||||
import simplejson
|
||||
except ImportError:
|
||||
# Python 2.6+ has a module similar to simplejson
|
||||
import json as simplejson
|
||||
|
||||
__all__ = ['MediawikiBrowser']
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue