Igor commited on
Commit
bb1bb3b
·
unverified ·
1 Parent(s): bdd03a2

Fix: Use synchronous runPython for bridge definitions to prevent initialization hang

Browse files
Files changed (1) hide show
  1. web/index.html +7 -1
web/index.html CHANGED
@@ -149,7 +149,9 @@
149
 
150
  console.log("Initializing Python bridge...");
151
  statusEl.innerText = "Configuring secure bridge...";
152
- await pyodide.runPythonAsync(`
 
 
153
  import json
154
  import base64
155
  from crypto import ShitposterCrypto
@@ -157,7 +159,11 @@ from steg import encode_bytes, decode_string
157
  from stealth import generate_stealth_text
158
  from fingerprint import get_fingerprint
159
 
 
 
160
  CRYPTO = ShitposterCrypto()
 
 
161
 
162
  def bridge_keygen():
163
  priv, pub_bytes = CRYPTO.generate_keypair()
 
149
 
150
  console.log("Initializing Python bridge...");
151
  statusEl.innerText = "Configuring secure bridge...";
152
+ pyodide.runPython(`
153
+ import sys
154
+ print("Python Bridge Loading...")
155
  import json
156
  import base64
157
  from crypto import ShitposterCrypto
 
159
  from stealth import generate_stealth_text
160
  from fingerprint import get_fingerprint
161
 
162
+ print("Imports successful.")
163
+
164
  CRYPTO = ShitposterCrypto()
165
+ # ... (rest of the code is same, no changes needed to logic)
166
+
167
 
168
  def bridge_keygen():
169
  priv, pub_bytes = CRYPTO.generate_keypair()