X-Git-Url: https://svn.cri.ensmp.fr/git/Photo.git/blobdiff_plain/36ecefbff8bccac22f635c0a9c508e90ba4137f7..4f089407d102551470a56a2998d147c2f78235b1:/metadata.py diff --git a/metadata.py b/metadata.py index 0b11842..c5e9ec4 100755 --- a/metadata.py +++ b/metadata.py @@ -137,9 +137,10 @@ class Metadata : node = index.get(path) if node : - firstLi = node['rdf:Alt/rdf:li'] - assert firstLi.unique, "More than one rdf:Alt (localisation not yet supported)" - return firstLi.element.content + firstLi = node.get('rdf:Alt/rdf:li') + if firstLi : + assert firstLi.unique, "More than one rdf:Alt (localisation not yet supported)" + return firstLi.element.content return '' security.declarePrivate('getXmpProp')