projects
/
Photo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
36ecefb
)
Ajout d'un test pour getXmpAlt : il arrive que Lr3 produise des Alt vides.
author
Benoît Pin
<benoit.pin@gmail.com>
Sat, 30 Oct 2010 19:58:22 +0000
(21:58 +0200)
committer
Benoît Pin
<benoit.pin@gmail.com>
Sat, 30 Oct 2010 19:58:22 +0000
(21:58 +0200)
metadata.py
patch
|
blob
|
history
diff --git
a/metadata.py
b/metadata.py
index
0b11842
..
c5e9ec4
100755
(executable)
--- a/
metadata.py
+++ b/
metadata.py
@@
-137,9
+137,10
@@
class Metadata :
node = index.get(path)
if node :
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')
return ''
security.declarePrivate('getXmpProp')