Upgrade pillow to 6.2.0 (#27581)
This commit is contained in:
1 parent
bb2a1cd439
commit
bbafeb5da2
8 files changed
+21
-26
No files matched your search
@@ -1,12 +1,14 @@
|
||||
"""Proxy camera platform that enables image processing of camera data."""
|
||||
import asyncio
|
||||
from datetime import timedelta
|
||||
import io
|
||||
import logging
|
||||
|
||||
from datetime import timedelta
|
||||
from PIL import Image
|
||||
import voluptuous as vol
|
||||
|
||||
from homeassistant.components.camera import PLATFORM_SCHEMA, Camera
|
||||
from homeassistant.const import CONF_ENTITY_ID, CONF_NAME, CONF_MODE
|
||||
from homeassistant.const import CONF_ENTITY_ID, CONF_MODE, CONF_NAME
|
||||
from homeassistant.exceptions import HomeAssistantError
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
import homeassistant.util.dt as dt_util
|
||||
@@ -58,9 +60,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
|
||||
def _precheck_image(image, opts):
|
||||
"""Perform some pre-checks on the given image."""
|
||||
from PIL import Image
|
||||
import io
|
||||
|
||||
if not opts:
|
||||
raise ValueError()
|
||||
try:
|
||||
@@ -77,9 +76,6 @@ def _precheck_image(image, opts):
|
||||
|
||||
def _resize_image(image, opts):
|
||||
"""Resize image."""
|
||||
from PIL import Image
|
||||
import io
|
||||
|
||||
try:
|
||||
img = _precheck_image(image, opts)
|
||||
except ValueError:
|
||||
@@ -125,8 +121,6 @@ def _resize_image(image, opts):
|
||||
|
||||
def _crop_image(image, opts):
|
||||
"""Crop image."""
|
||||
import io
|
||||
|
||||
try:
|
||||
img = _precheck_image(image, opts)
|
||||
except ValueError:
|
||||
|
||||
Reference in new issue
Block a user