Update pylint to 2.8.0 (#49637)

This commit is contained in:
Marc Mueller 2021-04-25 02:39:24 +02:00 committed by GitHub
parent 28eaa67986
commit f1d48ddfe3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
32 changed files with 114 additions and 114 deletions

View file

@ -124,14 +124,14 @@ class ImageProcessingSsocr(ImageProcessingEntity):
img = Image.open(stream)
img.save(self.filepath, "png")
ocr = subprocess.Popen(
with subprocess.Popen(
self._command, stdout=subprocess.PIPE, stderr=subprocess.PIPE
)
out = ocr.communicate()
if out[0] != b"":
self._state = out[0].strip().decode("utf-8")
else:
self._state = None
_LOGGER.warning(
"Unable to detect value: %s", out[1].strip().decode("utf-8")
)
) as ocr:
out = ocr.communicate()
if out[0] != b"":
self._state = out[0].strip().decode("utf-8")
else:
self._state = None
_LOGGER.warning(
"Unable to detect value: %s", out[1].strip().decode("utf-8")
)