Farm: bitgleich.py prueft die Schalterzeile beim Einreichen (Abbruch bei leerer/fremder Zeile)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d8b5efae04
commit
7075d68a75
@@ -26,6 +26,9 @@ if modus == "einreichen":
|
||||
for i, a in enumerate(sys.argv):
|
||||
if a == "--arm":
|
||||
n, rest = sys.argv[i + 1].split("=", 1); zc, zeile = rest.rsplit(":", 1); zw, c = zc.split("@", 1)
|
||||
inhalt = open(zeile, encoding="utf-8-sig").read()
|
||||
if "MOTOR_ZEILE=" not in inhalt and not inhalt.lstrip().startswith(("R0=", "MOTOR_")): sys.exit(f"Zeile {zeile} sieht nicht nach einer Schalterzeile aus - Abbruch")
|
||||
if len(inhalt.strip()) < 40: sys.exit(f"Zeile {zeile} ist zu kurz ({len(inhalt.strip())} Zeichen) - Abbruch")
|
||||
arme.append((n, zw, c, zeile))
|
||||
teile, prio, strasse, frist = int(arg("--teile", "6")), int(arg("--prio", "-15")), arg("--strasse", ""), "--frist" in sys.argv
|
||||
tmp = tempfile.mkdtemp()
|
||||
|
||||
Reference in New Issue
Block a user