mirror of
				https://opendev.org/x/pyghmi
				synced 2025-10-31 11:22:24 +00:00 
			
		
		
		
	Allow LookupError on decode
If a minimal Python distro does not have obscure decodes, do not cause a problem. t review Change-Id: Ife9631c353ca5b8160019eb26d0fe781a5c2179f
This commit is contained in:
		| @@ -229,12 +229,12 @@ class FRU(object): | ||||
|             if lang in (0, 25): | ||||
|                 try: | ||||
|                     retinfo = retinfo.decode('iso-8859-1') | ||||
|                 except UnicodeDecodeError: | ||||
|                 except (UnicodeError, LookupError): | ||||
|                     pass | ||||
|             else: | ||||
|                 try: | ||||
|                     retinfo = retinfo.decode('utf-16le') | ||||
|                 except UnicodeDecodeError: | ||||
|                 except (UnicodeDecodeError, LookupError): | ||||
|                     pass | ||||
|             # Some things lie about being text.  Do the best we can by | ||||
|             # removing trailing spaces and nulls like makes sense for text | ||||
|   | ||||
		Reference in New Issue
	
	Block a user