From 3082f36026b7dc869a3349f3467ca12db0235d66 Mon Sep 17 00:00:00 2001 From: "Hausmeister (ax41-1.fsn.mon2.de)" Date: Fri, 19 Jan 2024 15:49:15 +0100 Subject: [PATCH] now with less derp --- src/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app.py b/src/app.py index 781dc0f..9bc93c1 100644 --- a/src/app.py +++ b/src/app.py @@ -9,7 +9,7 @@ def get_jitsi_status(): try: content = urllib.request.urlopen("https://talk.chaoswest.tv/room-census").read() census = json.loads(content) - return any(room["room_name"] == "cws-lounge@muc.meet.jitsi" for room in census["room_census"]) + return any(room["room_name"] == "cws-lounge@muc.meet.jitsi" for room in census.get("room_census", [])) except Exception as e: print("shit got fucked up:") print(e) @@ -35,7 +35,7 @@ def spaceapi(): status = get_jitsi_status() - if status: + if status is not None: result["state"] = { 'open': status }