Fix flake8, black and pylint errors in code
Change-Id: Ic03f4d31e2ba9801be20d3679bd5749948cab39d
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/osm_ee/util/util_grpc.py b/osm_ee/util/util_grpc.py
index 5fe8fc5..2dc68fa 100644
--- a/osm_ee/util/util_grpc.py
+++ b/osm_ee/util/util_grpc.py
@@ -14,17 +14,19 @@
def create_secure_context() -> ssl.SSLContext:
# retrieve certificates from secrets
if not _retrieve_certs():
- logger.warning("TLS Certificates not found, starting gRPC server in unsecure mode")
+ logger.warning(
+ "TLS Certificates not found, starting gRPC server in unsecure mode"
+ )
return None
# create SSL context
ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ctx.verify_mode = ssl.CERT_REQUIRED
ctx.load_cert_chain(SERVER_CERT_FILE, SERVER_KEY_FILE)
ctx.load_verify_locations(CLIENT_CA_FILE)
- ctx.set_ciphers('ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20')
- ctx.set_alpn_protocols(['h2'])
+ ctx.set_ciphers("ECDHE+AESGCM:ECDHE+CHACHA20:DHE+AESGCM:DHE+CHACHA20")
+ ctx.set_alpn_protocols(["h2"])
try:
- ctx.set_npn_protocols(['h2'])
+ ctx.set_npn_protocols(["h2"])
except NotImplementedError:
pass
return ctx