mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 12:15:33 +01:00
Warn about tornado. Fixes #24
This commit is contained in:
parent
65d0dd47f3
commit
4fa7bc196a
@ -4,7 +4,7 @@ python:
|
|||||||
- "2.7"
|
- "2.7"
|
||||||
install:
|
install:
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- pip install flake8==3.5.0 pylint==1.8.4
|
- pip install tornado esptool flake8==3.5.0 pylint==1.8.4
|
||||||
script:
|
script:
|
||||||
- flake8 esphomeyaml
|
- flake8 esphomeyaml
|
||||||
- pylint esphomeyaml
|
- pylint esphomeyaml
|
||||||
|
@ -7,6 +7,8 @@ import os
|
|||||||
import random
|
import random
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import tornado
|
import tornado
|
||||||
import tornado.gen
|
import tornado.gen
|
||||||
@ -17,15 +19,16 @@ try:
|
|||||||
import tornado.websocket
|
import tornado.websocket
|
||||||
import tornado.concurrent
|
import tornado.concurrent
|
||||||
except ImportError as err:
|
except ImportError as err:
|
||||||
pass
|
_LOGGER.error("Attempted to load dashboard, but tornado is not installed! "
|
||||||
|
"Please run \"pip2 install tornado esptool\" in your terminal.")
|
||||||
|
|
||||||
from esphomeyaml import const, core, __main__
|
from esphomeyaml import const, core, __main__
|
||||||
from esphomeyaml.__main__ import get_serial_ports, get_base_path, get_name
|
from esphomeyaml.__main__ import get_serial_ports, get_base_path, get_name
|
||||||
from esphomeyaml.helpers import quote
|
from esphomeyaml.helpers import quote
|
||||||
|
|
||||||
_LOGGER = logging.getLogger(__name__)
|
|
||||||
CONFIG_DIR = ''
|
CONFIG_DIR = ''
|
||||||
|
|
||||||
|
|
||||||
# pylint: disable=abstract-method, arguments-differ
|
# pylint: disable=abstract-method, arguments-differ
|
||||||
class EsphomeyamlCommandWebSocket(tornado.websocket.WebSocketHandler):
|
class EsphomeyamlCommandWebSocket(tornado.websocket.WebSocketHandler):
|
||||||
def __init__(self, application, request, **kwargs):
|
def __init__(self, application, request, **kwargs):
|
||||||
|
Loading…
Reference in New Issue
Block a user