1
0
mirror of https://github.com/esphome/esphome.git synced 2025-02-20 20:08:20 +00:00

Fix encoding bug (#2242)

This commit is contained in:
Jesse Hills 2021-09-06 08:57:37 +12:00 committed by GitHub
parent 97eba1eecc
commit 2a653642f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -608,9 +608,7 @@ class EditRequestHandler(BaseHandler):
@bind_config
def post(self, configuration=None):
# pylint: disable=no-value-for-parameter
with open(
file=settings.rel_path(configuration), mode="wb", encoding="utf-8"
) as f:
with open(file=settings.rel_path(configuration), mode="wb") as f:
f.write(self.request.body)
self.set_status(200)