Merge pull request #615 from home-assistant/dev

Release 122
This commit is contained in:
Pascal Vizeli 2018-08-02 23:39:43 +02:00 committed by GitHub
commit 6ac45a24fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 24 additions and 23 deletions

View File

@ -5,6 +5,7 @@ FROM $BUILD_FROM
ENV LANG C.UTF-8 ENV LANG C.UTF-8
# Setup base # Setup base
COPY requirements.txt /usr/src/
RUN apk add --no-cache \ RUN apk add --no-cache \
git \ git \
socat \ socat \
@ -14,11 +15,9 @@ RUN apk add --no-cache \
&& apk add --no-cache --virtual .build-dependencies \ && apk add --no-cache --virtual .build-dependencies \
make \ make \
g++ \ g++ \
&& pip3 install --no-cache-dir \ && pip3 install -r /usr/src/requirements.txt \
uvloop==0.11.0 \ && apk del .build-dependencies \
cchardet==2.1.1 \ && rm -f /usr/src/requirements.txt
pycryptodome==3.6.4 \
&& apk del .build-dependencies
# Install HassIO # Install HassIO
COPY . /usr/src/hassio COPY . /usr/src/hassio

View File

@ -80,7 +80,7 @@ class AddonsData(JsonConfig, CoreSysAttributes):
read_json_file(repository_file) read_json_file(repository_file)
) )
except (OSError, json.JSONDecodeError): except (OSError, json.JSONDecodeError, UnicodeDecodeError):
_LOGGER.warning("Can't read repository information from %s", _LOGGER.warning("Can't read repository information from %s",
repository_file) repository_file)
return return

View File

@ -129,7 +129,8 @@ SCHEMA_ADDON_CONFIG = vol.Schema({
vol.Coerce(str): vol.Any(SCHEMA_ELEMENT, [SCHEMA_ELEMENT]) vol.Coerce(str): vol.Any(SCHEMA_ELEMENT, [SCHEMA_ELEMENT])
})) }))
}), False), }), False),
vol.Optional(ATTR_IMAGE): vol.Match(r"^[\w{}]+/[\-\w{}]+$"), vol.Optional(ATTR_IMAGE):
vol.Match(r"^([a-zA-Z.:\d{}]+/)*?([\w{}]+)/([\-\w{}]+)$"),
vol.Optional(ATTR_TIMEOUT, default=10): vol.Optional(ATTR_TIMEOUT, default=10):
vol.All(vol.Coerce(int), vol.Range(min=10, max=120)), vol.All(vol.Coerce(int), vol.Range(min=10, max=120)),
}, extra=vol.REMOVE_EXTRA) }, extra=vol.REMOVE_EXTRA)

View File

@ -2,7 +2,7 @@
from pathlib import Path from pathlib import Path
from ipaddress import ip_network from ipaddress import ip_network
HASSIO_VERSION = '121' HASSIO_VERSION = '122'
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons" URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
URL_HASSIO_VERSION = \ URL_HASSIO_VERSION = \

View File

@ -45,7 +45,7 @@ class JsonConfig:
if self._file.is_file(): if self._file.is_file():
try: try:
self._data = read_json_file(self._file) self._data = read_json_file(self._file)
except (OSError, json.JSONDecodeError): except (OSError, json.JSONDecodeError, UnicodeDecodeError):
_LOGGER.warning("Can't read %s", self._file) _LOGGER.warning("Can't read %s", self._file)
self._data = {} self._data = {}

13
requirements.txt Normal file
View File

@ -0,0 +1,13 @@
attr==0.3.1
async_timeout==3.0.0
aiohttp==3.3.2
docker==3.4.0
colorlog==3.1.2
voluptuous==0.11.1
gitpython==2.1.10
pytz==2018.4
pyudev==0.21.0
pycryptodome==3.6.4
cpe==1.2.1
uvloop==0.11.1
cchardet==2.1.1

View File

@ -38,18 +38,5 @@ setup(
'hassio.utils', 'hassio.utils',
'hassio.snapshots' 'hassio.snapshots'
], ],
include_package_data=True, include_package_data=True
install_requires=[
'attr==0.3.1',
'async_timeout==3.0.0',
'aiohttp==3.3.2',
'docker==3.4.0',
'colorlog==3.1.2',
'voluptuous==0.11.1',
'gitpython==2.1.10',
'pytz==2018.4',
'pyudev==0.21.0',
'pycryptodome==3.6.4',
"cpe==1.2.1"
]
) )

View File

@ -5,6 +5,7 @@ envlist = lint
deps = deps =
flake8==3.5.0 flake8==3.5.0
pylint==2.0.0 pylint==2.0.0
-r{toxinidir}/requirements.txt
[testenv:lint] [testenv:lint]
basepython = python3 basepython = python3