Skip to content

Commit f7993a4

Browse files
committed
API command arg fix
1 parent 9d5af33 commit f7993a4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

scripts/depthmap_api.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from src.core import core_generation_funnel
1717
from src.common_ui import main_ui_panel
1818
from src.misc import SCRIPT_VERSION
19+
from src import backbone
1920

2021
def encode_to_base64(image):
2122
if type(image) is str:
@@ -143,7 +144,7 @@ async def extras_process(
143144

144145
try:
145146
import modules.script_callbacks as script_callbacks
146-
147-
script_callbacks.on_app_started(depth_api)
147+
if backbone.get_cmd_opt('api', False):
148+
script_callbacks.on_app_started(depth_api)
148149
except:
149-
pass
150+
print('DepthMap API could not start')

0 commit comments

Comments
 (0)