mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
add a log message stating which json encoder is being using
This commit is contained in:
parent
c35535edc3
commit
8ef55c380e
1 changed files with 4 additions and 0 deletions
|
@ -46,10 +46,12 @@ try:
|
|||
import json
|
||||
except ImportError:
|
||||
import simplejson as json
|
||||
log.info('Using simplejson for json converting')
|
||||
|
||||
# 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"):
|
||||
log.info('Using python-json for json converting')
|
||||
json.dumps = json.write
|
||||
json.loads = json.read
|
||||
|
||||
|
@ -61,6 +63,8 @@ if not hasattr(json, "dumps"):
|
|||
|
||||
json.dump = dump
|
||||
json.load = load
|
||||
else:
|
||||
log.info('Using simplejson for json converting')
|
||||
|
||||
import pkg_resources
|
||||
import xdg, xdg.BaseDirectory
|
||||
|
|
Loading…
Add table
Reference in a new issue