mirror of
https://github.com/esphome/esphome.git
synced 2024-11-18 11:06:11 +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
@ -325,7 +325,10 @@ class WizardRequestHandler(BaseHandler):
|
|||||||
def post(self):
|
def post(self):
|
||||||
from esphome import wizard
|
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')
|
destination = settings.rel_path(kwargs['name'] + '.yaml')
|
||||||
wizard.wizard_write(path=destination, **kwargs)
|
wizard.wizard_write(path=destination, **kwargs)
|
||||||
self.redirect('./?begin=True')
|
self.redirect('./?begin=True')
|
||||||
|
Loading…
Reference in New Issue
Block a user