fix(rdesign): run runner startup unconditionally (Scribus doesn't set __main__)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
aacbcdaddf
commit
3a443a0d09
|
|
@ -320,20 +320,18 @@ def run_socket_server():
|
|||
print(f"[runner] Socket error: {e}", file=sys.stderr)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
_ensure_dirs()
|
||||
print("[runner] Scribus bridge runner starting...")
|
||||
# Run socket server in a thread so Scribus event loop can continue
|
||||
t = threading.Thread(target=run_socket_server, daemon=True)
|
||||
t.start()
|
||||
print("[runner] Socket server thread started")
|
||||
# Always run — Scribus --python-script doesn't set __name__ to "__main__"
|
||||
_ensure_dirs()
|
||||
print("[runner] Scribus bridge runner starting...")
|
||||
# Run socket server in a thread so Scribus event loop can continue
|
||||
t = threading.Thread(target=run_socket_server, daemon=True)
|
||||
t.start()
|
||||
print("[runner] Socket server thread started")
|
||||
|
||||
# Keep the script alive
|
||||
# When run via --python-script, Scribus will execute this then exit
|
||||
# We need to keep it running for the socket server
|
||||
try:
|
||||
# Keep the script alive
|
||||
try:
|
||||
while True:
|
||||
import time
|
||||
time.sleep(1)
|
||||
except KeyboardInterrupt:
|
||||
except KeyboardInterrupt:
|
||||
print("[runner] Shutting down")
|
||||
|
|
|
|||
Loading…
Reference in New Issue