aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen/lv2specgen.py
diff options
context:
space:
mode:
Diffstat (limited to 'lv2specgen/lv2specgen.py')
-rwxr-xr-xlv2specgen/lv2specgen.py26
1 files changed, 18 insertions, 8 deletions
diff --git a/lv2specgen/lv2specgen.py b/lv2specgen/lv2specgen.py
index e3948f1..14c88c3 100755
--- a/lv2specgen/lv2specgen.py
+++ b/lv2specgen/lv2specgen.py
@@ -1275,14 +1275,24 @@ def writeIndex(model, specloc, index_path, root_path, root_uri, online):
break
# Verify that this date is the latest
- for r in model.triples([ext_node, doap.release, None]):
- this_date = model.value(r[2], doap.created, None)
- if this_date > date:
- print(
- "warning: %s revision %d.%d (%s) is not the latest release"
- % (ext_node, minor, micro, date)
- )
- break
+ if date is None:
+ print("warning: %s has no doap:created date" % ext_node)
+ else:
+ for r in model.triples([ext_node, doap.release, None]):
+ this_date = model.value(r[2], doap.created, None)
+ if this_date is None:
+ print(
+ "warning: %s has no doap:created date"
+ % (ext_node, minor, micro, date)
+ )
+ continue
+
+ if this_date > date:
+ print(
+ "warning: %s revision %d.%d (%s) is not the latest release"
+ % (ext_node, minor, micro, date)
+ )
+ break
# Get name and short description
name = model.value(ext_node, doap.name, None)