mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
dashboard: use fastest available yaml loader in the dashboard (#5771)
* dashboard: use fastest available yaml loader in the dashboard * remove unrelated change
This commit is contained in:
parent
3644853d38
commit
5f1d8dfa5b
1 changed files with 2 additions and 1 deletions
|
@ -34,6 +34,7 @@ from esphome import const, platformio_api, yaml_util
|
||||||
from esphome.helpers import get_bool_env, mkdir_p
|
from esphome.helpers import get_bool_env, mkdir_p
|
||||||
from esphome.storage_json import StorageJSON, ext_storage_path, trash_storage_path
|
from esphome.storage_json import StorageJSON, ext_storage_path, trash_storage_path
|
||||||
from esphome.util import get_serial_ports, shlex_quote
|
from esphome.util import get_serial_ports, shlex_quote
|
||||||
|
from esphome.yaml_util import FastestAvailableSafeLoader
|
||||||
|
|
||||||
from .core import DASHBOARD, list_dashboard_entries
|
from .core import DASHBOARD, list_dashboard_entries
|
||||||
from .entries import DashboardEntry
|
from .entries import DashboardEntry
|
||||||
|
@ -886,7 +887,7 @@ class SecretKeysRequestHandler(BaseHandler):
|
||||||
self.write(json.dumps(secret_keys))
|
self.write(json.dumps(secret_keys))
|
||||||
|
|
||||||
|
|
||||||
class SafeLoaderIgnoreUnknown(yaml.SafeLoader):
|
class SafeLoaderIgnoreUnknown(FastestAvailableSafeLoader):
|
||||||
def ignore_unknown(self, node):
|
def ignore_unknown(self, node):
|
||||||
return f"{node.tag} {node.value}"
|
return f"{node.tag} {node.value}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue