"""Sicherheits-Not-Aus für CoinPoker-Aktionen. Verwaltet die Stopp-Dateien über alle relevanten Pfade des Repositories und verhindert Klick-Aktionen bei aktivem Not-Aus. """ import os _w = os.path.dirname(os.path.abspath(__file__)) while _w != "/" and not os.path.isdir(os.path.join(_w, "lesen")): _w = os.path.dirname(_w) WURZEL = _w import sys sys.path.insert(0, os.path.join(WURZEL, "hand")) sys.path.insert(0, os.path.join(WURZEL, "client")) import notaus # noqa: E402 eine Quelle für die Stopp-Dateien STOPP_PFADE = notaus.PFADE def ist_gestoppt(): """Prüft, ob an mindestens einem Stopp-Pfad eine Not-Aus-Datei existiert.""" return any(os.path.exists(p) for p in STOPP_PFADE) def stopp_setzen(): """Legt an allen Stopp-Pfaden die Not-Aus-Datei an.""" return notaus.setzen(STOPP_PFADE) def stopp_aufheben(): """Entfernt alle Not-Aus-Dateien.""" notaus.aufheben(STOPP_PFADE)