Updated bindings code.
This commit is contained in:
parent
62f46c0eb7
commit
13f110ab34
@ -412,7 +412,8 @@ class Script(script.Script):
|
|||||||
# Add plugin keybindings from APIHelper storage
|
# Add plugin keybindings from APIHelper storage
|
||||||
try:
|
try:
|
||||||
import cthulhu.cthulhu as cthulhu
|
import cthulhu.cthulhu as cthulhu
|
||||||
api_helper = cthulhu.getCthulhu()
|
if hasattr(cthulhu, 'cthulhuApp') and cthulhu.cthulhuApp:
|
||||||
|
api_helper = cthulhu.cthulhuApp.getAPIHelper()
|
||||||
with open('/tmp/extension_bindings_debug.log', 'a') as f:
|
with open('/tmp/extension_bindings_debug.log', 'a') as f:
|
||||||
f.write(f"=== Checking for plugin bindings ===\n")
|
f.write(f"=== Checking for plugin bindings ===\n")
|
||||||
f.write(f"api_helper exists: {api_helper is not None}\n")
|
f.write(f"api_helper exists: {api_helper is not None}\n")
|
||||||
@ -434,6 +435,9 @@ class Script(script.Script):
|
|||||||
else:
|
else:
|
||||||
with open('/tmp/extension_bindings_debug.log', 'a') as f:
|
with open('/tmp/extension_bindings_debug.log', 'a') as f:
|
||||||
f.write(f"=== No plugin bindings available ===\n")
|
f.write(f"=== No plugin bindings available ===\n")
|
||||||
|
else:
|
||||||
|
with open('/tmp/extension_bindings_debug.log', 'a') as f:
|
||||||
|
f.write(f"=== cthulhuApp not available ===\n")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
import cthulhu.debug as debug
|
import cthulhu.debug as debug
|
||||||
debug.printMessage(debug.LEVEL_WARNING, f"Failed to add plugin bindings: {e}", True)
|
debug.printMessage(debug.LEVEL_WARNING, f"Failed to add plugin bindings: {e}", True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user