mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-03 15:08:40 +00:00
break webui if python-json is not installed
This commit is contained in:
parent
056dc50400
commit
f45badc34d
1 changed files with 4 additions and 6 deletions
|
@ -48,7 +48,10 @@ from deluge.log import LOG as log
|
||||||
from deluge import component
|
from deluge import component
|
||||||
|
|
||||||
from page_decorators import check_session
|
from page_decorators import check_session
|
||||||
|
try:
|
||||||
|
import json #it's early enough to force people to install this
|
||||||
|
except:
|
||||||
|
raise Exception("please install python-json")
|
||||||
|
|
||||||
class json_rpc:
|
class json_rpc:
|
||||||
"""
|
"""
|
||||||
|
@ -64,11 +67,6 @@ class json_rpc:
|
||||||
def POST(self):
|
def POST(self):
|
||||||
web.header("Content-Type", "application/x-json")
|
web.header("Content-Type", "application/x-json")
|
||||||
id = 0
|
id = 0
|
||||||
try:
|
|
||||||
import json #not listed in dependency's.
|
|
||||||
except:
|
|
||||||
log.error('{"error":"python-json is not installed"}')
|
|
||||||
return '{"error":"python-json is not installed"}'
|
|
||||||
try:
|
try:
|
||||||
log.debug("json-data:")
|
log.debug("json-data:")
|
||||||
log.debug(webapi.data())
|
log.debug(webapi.data())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue