Fix error for no category
This commit is contained in:
		| @ -142,7 +142,9 @@ class HonAppliance: | |||||||
|             if last is None: |             if last is None: | ||||||
|                 continue |                 continue | ||||||
|             parameters = command_history[last].get("command", {}).get("parameters", {}) |             parameters = command_history[last].get("command", {}).get("parameters", {}) | ||||||
|             if command.categories: |             if command.categories and ( | ||||||
|  |                 parameters.get("program") or parameters.get("category") | ||||||
|  |             ): | ||||||
|                 if parameters.get("program"): |                 if parameters.get("program"): | ||||||
|                     command.category = parameters.pop("program").split(".")[-1].lower() |                     command.category = parameters.pop("program").split(".")[-1].lower() | ||||||
|                 else: |                 else: | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								setup.py
									
									
									
									
									
								
							| @ -7,7 +7,7 @@ with open("README.md", "r") as f: | |||||||
|  |  | ||||||
| setup( | setup( | ||||||
|     name="pyhOn", |     name="pyhOn", | ||||||
|     version="0.10.3", |     version="0.10.4", | ||||||
|     author="Andre Basche", |     author="Andre Basche", | ||||||
|     description="Control hOn devices with python", |     description="Control hOn devices with python", | ||||||
|     long_description=long_description, |     long_description=long_description, | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user