Don't load remote settings for send command

pull/2371/head
Åke Forslund 2019-10-25 14:04:23 +02:00
parent a3e35d736b
commit 0811df3831
1 changed files with 8 additions and 2 deletions

View File

@ -17,7 +17,9 @@ import json
from websocket import create_connection
from mycroft.configuration import ConfigurationManager
from mycroft.configuration import Configuration
from mycroft.configuration.locations import (DEFAULT_CONFIG, SYSTEM_CONFIG,
USER_CONFIG)
from mycroft.messagebus.client import MessageBusClient
from mycroft.messagebus.message import Message
@ -66,7 +68,11 @@ def send(message_to_send, data_to_send=None):
data_to_send = data_to_send or {}
# Calculate the standard Mycroft messagebus websocket address
config = ConfigurationManager.get().get("websocket")
config = Configuration.get([DEFAULT_CONFIG,
SYSTEM_CONFIG,
USER_CONFIG],
cache=False)
config = config.get("websocket")
url = MessageBusClient.build_url(
config.get("host"),
config.get("port"),