mirror of
https://github.com/NaN-tic/trytond-monitoring_network.git
synced 2023-12-14 03:42:58 +01:00
Revert latest import changes in jsonrpclib.
This commit is contained in:
parent
73a39a6c02
commit
74224e4d53
|
@ -3,7 +3,7 @@ import inspect
|
||||||
import re
|
import re
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from nantic_monitoring_network.jsonrpclib import config
|
from jsonrpclib import config
|
||||||
|
|
||||||
iter_types = [
|
iter_types = [
|
||||||
types.DictType,
|
types.DictType,
|
||||||
|
|
|
@ -57,9 +57,9 @@ import string
|
||||||
import random
|
import random
|
||||||
|
|
||||||
# Library includes
|
# Library includes
|
||||||
import nantic_monitoring_network.jsonrpclib
|
import jsonrpclib
|
||||||
from nantic_monitoring_network.jsonrpclib import config
|
from jsonrpclib import config
|
||||||
from nantic_monitoring_network.jsonrpclib import history
|
from jsonrpclib import history
|
||||||
|
|
||||||
# JSON library importing
|
# JSON library importing
|
||||||
cjson = None
|
cjson = None
|
||||||
|
@ -486,7 +486,7 @@ def dumps(params=[], methodname=None, methodresponse=None,
|
||||||
raise ValueError('Method name must be a string, or methodresponse '+
|
raise ValueError('Method name must be a string, or methodresponse '+
|
||||||
'must be set to True.')
|
'must be set to True.')
|
||||||
if config.use_jsonclass == True:
|
if config.use_jsonclass == True:
|
||||||
from nantic_monitoring_network.jsonrpclib import jsonclass
|
from jsonrpclib import jsonclass
|
||||||
params = jsonclass.dump(params)
|
params = jsonclass.dump(params)
|
||||||
if methodresponse is True:
|
if methodresponse is True:
|
||||||
if rpcid is None:
|
if rpcid is None:
|
||||||
|
@ -514,7 +514,7 @@ def loads(data):
|
||||||
# should return something like the following:
|
# should return something like the following:
|
||||||
# { 'jsonrpc':'2.0', 'error': fault.error(), id: None }
|
# { 'jsonrpc':'2.0', 'error': fault.error(), id: None }
|
||||||
if config.use_jsonclass == True:
|
if config.use_jsonclass == True:
|
||||||
from nantic_monitoring_network.jsonrpclib import jsonclass
|
from jsonrpclib import jsonclass
|
||||||
result = jsonclass.load(result)
|
result = jsonclass.load(result)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue