mirror of
https://github.com/markqvist/Sideband.git
synced 2025-11-30 04:06:39 -05:00
Startup checks for CLI console
This commit is contained in:
parent
2e32f22076
commit
ca2ef3ca37
2 changed files with 8 additions and 3 deletions
|
|
@ -6958,8 +6958,13 @@ def run():
|
|||
|
||||
if args.interactive:
|
||||
while not sideband.getstate("core.started") == True: time.sleep(0.1)
|
||||
from .sideband import console
|
||||
console.attach(sideband)
|
||||
import importlib
|
||||
if importlib.util.find_spec('prompt_toolkit') != None:
|
||||
from .sideband import console
|
||||
console.attach(sideband)
|
||||
else:
|
||||
print("Could not start Sideband console, since the \"prompt-toolkit\" module is not available")
|
||||
print("You can install it with \"pip install prompt-toolkit\"")
|
||||
|
||||
else:
|
||||
while True: time.sleep(5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue