Browse Source

Fixed RestSubmitter POST requests.

Change-Id: Iedf375bd85a826b8712a41f6c7199681aee94c9a
changes/26/821826/1 0.5.0
Nicola Peditto 8 months ago
parent
commit
6fc6deef0e
  1. 52
      iotronic_lightningrod/modules/device_manager.py
  2. 2
      tox.ini

52
iotronic_lightningrod/modules/device_manager.py

@ -787,32 +787,32 @@ class DeviceManager(Module.Module):
response = requests.request(
method,
url,
params=json.dumps(parameters['params']) if '\
params' in parameters else None,
data=json.dumps(parameters['data']) if '\
data' in parameters else None,
json=parameters['json'] if '\
json' in parameters else None,
headers=parameters['headers'] if '\
headers' in parameters else None,
cookies=parameters['cookies'] if '\
cookies' in parameters else None,
files=parameters['files'] if '\
files' in parameters else None,
auth=parameters['auth'] if '\
auth' in parameters else None,
timeout=float(parameters['timeout']) if '\
timeout' in parameters else None,
allow_redirects=parameters['allow_redirects'] if '\
allow_redirects' in parameters else True,
proxies=parameters['proxies'] if '\
proxies' in parameters else None,
verify=parameters['verify'] if '\
verify' in parameters else True,
stream=parameters['stream'] if '\
stream' in parameters else False,
cert=parameters['cert'] if '\
cert' in parameters else None,
params=json.dumps(parameters['params']) \
if 'params' in parameters else None,
data=json.dumps(parameters['data']) \
if 'data' in parameters else None,
json=parameters['json'] \
if 'json' in parameters else None,
headers=parameters['headers'] \
if 'headers' in parameters else None,
cookies=parameters['cookies'] \
if 'cookies' in parameters else None,
files=parameters['files'] \
if 'files' in parameters else None,
auth=parameters['auth'] \
if 'auth' in parameters else None,
timeout=float(parameters['timeout']) \
if 'timeout' in parameters else None,
allow_redirects=parameters['allow_redirects'] \
if 'allow_redirects' in parameters else True,
proxies=parameters['proxies'] \
if 'proxies' in parameters else None,
verify=parameters['verify'] \
if 'verify' in parameters else True,
stream=parameters['stream'] \
if 'stream' in parameters else False,
cert=parameters['cert'] \
if 'cert' in parameters else None,
)

2
tox.ini

@ -58,6 +58,6 @@ basepython = python3.8
show-source = True
builtins = _
#ignore = E711,E712,H404,H405,E123,E125,E901,H301
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E711,E712,H405,W504,E731,H238,E126,E128,E731,H405,N530,W504,E129,E741,W503,F821,F999,F841,E402,W605
ignore = E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E711,E712,H405,W504,E731,H238,E126,E128,E731,H405,N530,W504,E129,E741,W503,F821,F999,F841,E402,W605,E502
exclude = .venv,.git,.tox,dist,doc,etc,*lib/python*,*egg,build,iotronic_lightningrod/modules/plugins/plugins_examples/,STUFF

Loading…
Cancel
Save