Catch and ignore UnicodeDecodeError in wd_catalog
This commit is contained in:
		
							parent
							
								
									52db7ac00f
								
							
						
					
					
						commit
						dc4455bec5
					
				| 
						 | 
					@ -153,12 +153,15 @@ def check_catalog(entity, catalog):
 | 
				
			||||||
                catalog.update(cat)
 | 
					                catalog.update(cat)
 | 
				
			||||||
                return
 | 
					                return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        html = get_catalog_url(catalog_url)
 | 
					        try:
 | 
				
			||||||
        if html:
 | 
					            html = get_catalog_url(catalog_url)
 | 
				
			||||||
            description = get_description_from_page(html)
 | 
					            if html:
 | 
				
			||||||
            if description:
 | 
					                description = get_description_from_page(html)
 | 
				
			||||||
                catalog['description'] = description
 | 
					                if description:
 | 
				
			||||||
                return
 | 
					                    catalog['description'] = description
 | 
				
			||||||
 | 
					                    return
 | 
				
			||||||
 | 
					        except UnicodeDecodeError:
 | 
				
			||||||
 | 
					            return
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for property_id in sorted(catalog_ids):
 | 
					    for property_id in sorted(catalog_ids):
 | 
				
			||||||
        if property_id == 'P350':
 | 
					        if property_id == 'P350':
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue