mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00: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:
		
				
					committed by
					
						 Brandon Davidson
						Brandon Davidson
					
				
			
			
				
	
			
			
			
						parent
						
							a6d31f05ee
						
					
				
				
					commit
					45630d74f3
				
			| @@ -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') | ||||
|   | ||||
		Reference in New Issue
	
	Block a user