From 1e83fed0a29559bfb019b93101a368d4606e7d98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Solbj=C3=B8rg?= Date: Mon, 3 Apr 2023 09:55:11 +0200 Subject: feat(labler): Update to tg23 syntax --- tech-support/labels/gondul.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tech-support/labels/gondul.py') diff --git a/tech-support/labels/gondul.py b/tech-support/labels/gondul.py index 74c1a23..c9fc538 100644 --- a/tech-support/labels/gondul.py +++ b/tech-support/labels/gondul.py @@ -7,7 +7,7 @@ import urllib.request GONDUL_USERNAME = os.getenv("GONDUL_USERNAME", "") GONDUL_PASSWORD = os.getenv("GONDUL_PASSWORD", "") -GONDUL_API = os.getenv("GONDUL_API", "https://tg18.gondul.gathering.org/api") +GONDUL_API = os.getenv("GONDUL_API", "https://gondul.tg23.gathering.org/api") GONDUL_SWITCHES_ENDPOINT = os.getenv( "GONDUL_SWITCHES_ENDPOINT", "/public/switches") @@ -40,7 +40,7 @@ def _do_switches_request( return switches -def _match_switches(switches, match="^e(.*)"): +def _match_switches(switches, match="^e([0-9]+-[0-9]+)"): pattern = re.compile(match) included_switches = [] @@ -61,7 +61,7 @@ def _sort_switches(switches): return sorted(switches, key=lambda x: (int(x[1:].split("-")[0]), x.split("-")[1])) -def fetch_gondul_switches(api=None, endpoint=None, username=None, password=None, match="^e(.*)"): +def fetch_gondul_switches(api=None, endpoint=None, username=None, password=None, match="^e([0-9]+-[0-9]+)"): # Use provided arg instead of environment variable if defined. _api = api if api is not None else GONDUL_API _endpoint = endpoint if endpoint is not None else GONDUL_SWITCHES_ENDPOINT -- cgit v1.2.3