mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Use b''.decode() instead of str(b'') (#941)
Handling of request arguments in WizardRequestHandler is not decoding bytes and rather just doing a str conversion resulting in a value of "b''" being supplied to the wizard code.
This commit is contained in:
parent
a6d31f05ee
commit
45630d74f3
1 changed files with 4 additions and 1 deletions
|
@ -325,7 +325,10 @@ class WizardRequestHandler(BaseHandler):
|
|||
def post(self):
|
||||
from esphome import wizard
|
||||
|
||||
kwargs = {k: ''.join(str(x) for x in v) for k, v in self.request.arguments.items()}
|
||||
kwargs = {
|
||||
k: ''.join(x.decode() for x in v)
|
||||
for k, v in self.request.arguments.items()
|
||||
}
|
||||
destination = settings.rel_path(kwargs['name'] + '.yaml')
|
||||
wizard.wizard_write(path=destination, **kwargs)
|
||||
self.redirect('./?begin=True')
|
||||
|
|
Loading…
Reference in a new issue