Fix lint
This commit is contained in:
parent
9800cd7c28
commit
6db76cbf51
@ -35,10 +35,11 @@ def process_requests(reqs):
|
|||||||
try:
|
try:
|
||||||
version = reqs.get('api-version')
|
version = reqs.get('api-version')
|
||||||
if version == 1:
|
if version == 1:
|
||||||
log('Processing request {}'.format(request_id))
|
log('Processing request {}'.format(request_id), level=DEBUG)
|
||||||
resp = process_requests_v1(reqs['ops'])
|
resp = process_requests_v1(reqs['ops'])
|
||||||
if request_id:
|
if request_id:
|
||||||
resp['request-id'] = request_id
|
resp['request-id'] = request_id
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
@ -52,6 +53,7 @@ def process_requests(reqs):
|
|||||||
resp = {'exit-code': 1, 'stderr': msg}
|
resp = {'exit-code': 1, 'stderr': msg}
|
||||||
if request_id:
|
if request_id:
|
||||||
resp['request-id'] = request_id
|
resp['request-id'] = request_id
|
||||||
|
|
||||||
return resp
|
return resp
|
||||||
|
|
||||||
|
|
||||||
|
@ -321,6 +321,8 @@ def client_relation_changed():
|
|||||||
rsp = process_requests(settings['broker_req'])
|
rsp = process_requests(settings['broker_req'])
|
||||||
unit_id = remote_unit().replace('/', '-')
|
unit_id = remote_unit().replace('/', '-')
|
||||||
unit_response_key = 'broker-rsp-' + unit_id
|
unit_response_key = 'broker-rsp-' + unit_id
|
||||||
|
# broker_rsp is being left for backward compatibility,
|
||||||
|
# unit_response_key superscedes it
|
||||||
data = {
|
data = {
|
||||||
'broker_rsp': rsp,
|
'broker_rsp': rsp,
|
||||||
unit_response_key: rsp,
|
unit_response_key: rsp,
|
||||||
|
Loading…
Reference in New Issue
Block a user