Skip to content
Snippets Groups Projects
Commit add61223 authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

PEP8 cleaning

parent 29310262
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ sys.path.append(str(Path(__file__).parents[1].resolve()))
import utils as u # noqa: E402
from utils_lib.apt import Apt # noqa: E402
def check_listen(host: str, port: int) -> bool:
"""Check if server is listening (TCP only).
......@@ -41,6 +42,7 @@ def check_listen(host: str, port: int) -> bool:
return result == 0
def is_ha() -> bool:
"""Check wether this setup is using higlhy-available databases.
......@@ -49,6 +51,7 @@ def is_ha() -> bool:
"""
return check_listen("127.0.0.1", 54321)
def get_haproxy_conf(path: str = "/etc/haproxy/haproxy.cfg") -> dict:
"""Get HAProxy configuration in a dictionary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment