refactor(meshchat_wrapper): improve code readability by formatting argument list and adding spacing
This commit is contained in:
@@ -1,20 +1,23 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def start_server(port=8000):
|
def start_server(port=8000):
|
||||||
try:
|
try:
|
||||||
from meshchatx.meshchat import main
|
from meshchatx.meshchat import main
|
||||||
|
|
||||||
sys.argv = [
|
sys.argv = [
|
||||||
'meshchat',
|
"meshchat",
|
||||||
'--headless',
|
"--headless",
|
||||||
'--host', '127.0.0.1',
|
"--host",
|
||||||
'--port', str(port)
|
"127.0.0.1",
|
||||||
|
"--port",
|
||||||
|
str(port),
|
||||||
]
|
]
|
||||||
|
|
||||||
main()
|
main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"Error starting MeshChatX server: {e}")
|
print(f"Error starting MeshChatX server: {e}")
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user