outposts: fix error when client hasn't be initialised

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-26 14:26:48 +01:00
parent 27e4c7027c
commit 53b10e64f8
1 changed files with 2 additions and 1 deletions

View File

@ -86,7 +86,8 @@ class BaseController:
def __exit__(self, exc_type, exc_value, traceback):
"""Cleanup after usage"""
self.client.__exit__(exc_type, exc_value, traceback)
if hasattr(self, "client"):
self.client.__exit__(exc_type, exc_value, traceback)
def get_static_deployment(self) -> str:
"""Return a static deployment configuration"""