-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowerTools-Addinmarket.py
More file actions
35 lines (29 loc) · 944 Bytes
/
Copy pathPowerTools-Addinmarket.py
File metadata and controls
35 lines (29 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# SPDX-License-Identifier: GPL-3.0-or-later
# Copyright (C) 2026 IMA LLC
from . import config
from . import commands
from .lib import fusionAddInUtils as futil
def run(context):
try:
if config.WAIT_FOR_DEBUGGER:
import debugpy
if not getattr(debugpy, "_fusion_listening", False):
try:
debugpy.listen(
("127.0.0.1", config.DEBUGGER_PORT),
in_process_debug_adapter=True,
)
except RuntimeError:
pass
debugpy._fusion_listening = True
if config.DEBUGGER_BLOCK_UNTIL_ATTACHED:
debugpy.wait_for_client()
commands.start()
except Exception:
futil.handle_error('run')
def stop(context):
try:
futil.clear_handlers()
commands.stop()
except Exception:
futil.handle_error('stop')