epub: Skip invalid dc:identifier
This commit is contained in:
		
							parent
							
								
									ce0b3d8d10
								
							
						
					
					
						commit
						fba95956de
					
				| 
						 | 
					@ -102,7 +102,10 @@ def get_epub_info(tmp_file_path, original_file_name, original_file_extension):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    identifiers = []
 | 
					    identifiers = []
 | 
				
			||||||
    for node in p.xpath('dc:identifier', namespaces=ns):
 | 
					    for node in p.xpath('dc:identifier', namespaces=ns):
 | 
				
			||||||
        identifier_name = node.attrib.values()[-1]
 | 
					        try:
 | 
				
			||||||
 | 
					            identifier_name = node.attrib.values()[-1]
 | 
				
			||||||
 | 
					        except IndexError:
 | 
				
			||||||
 | 
					            continue
 | 
				
			||||||
        identifier_value = node.text
 | 
					        identifier_value = node.text
 | 
				
			||||||
        if identifier_name in ('uuid', 'calibre') or identifier_value is None:
 | 
					        if identifier_name in ('uuid', 'calibre') or identifier_value is None:
 | 
				
			||||||
            continue
 | 
					            continue
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user