1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-29 08:32:26 +01:00

Bump pylint from 2.7.2 to 2.8.2 (#1729)

* Bump pylint from 2.7.2 to 2.8.2

Bumps [pylint](https://github.com/PyCQA/pylint) from 2.7.2 to 2.8.2.
- [Release notes](https://github.com/PyCQA/pylint/releases)
- [Changelog](https://github.com/PyCQA/pylint/blob/master/ChangeLog)
- [Commits](https://github.com/PyCQA/pylint/compare/pylint-2.7.2...v2.8.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix pylint

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
dependabot[bot]
2021-05-10 17:57:25 -03:00
committed by GitHub
parent 33bf78c369
commit 73252ccd25
4 changed files with 45 additions and 46 deletions

View File

@@ -296,15 +296,14 @@ def run_ota_impl_(remote_host, remote_port, password, filename):
_LOGGER.error("Connecting to %s:%s failed: %s", remote_host, remote_port, err)
return 1
file_handle = open(filename, "rb")
try:
perform_ota(sock, password, file_handle, filename)
except OTAError as err:
_LOGGER.error(str(err))
return 1
finally:
sock.close()
file_handle.close()
with open(filename, "rb") as file_handle:
try:
perform_ota(sock, password, file_handle, filename)
except OTAError as err:
_LOGGER.error(str(err))
return 1
finally:
sock.close()
return 0