clients: explicitly declare cbc_proxy_client

it is global rather than local but python cannot infer this and we get
UnboundLocalError

Signed-off-by: Toby Lorne <toby.lornewelch-richards@digital.cabinet-office.gov.uk>
This commit is contained in:
Toby Lorne
2020-10-20 13:01:17 +01:00
parent 2cc0a65851
commit efa6fb0bd9

View File

@@ -114,6 +114,7 @@ def create_app(application):
performance_platform_client.init_app(application)
document_download_client.init_app(application)
global cbc_proxy_client
if application.config['CBC_PROXY_AWS_ACCESS_KEY_ID']:
cbc_proxy_client = CBCProxyClient()
cbc_proxy_client.init_app(application)