aboutsummaryrefslogtreecommitdiffstats
path: root/lv2specgen
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-11-17 11:11:25 +0100
committerDavid Robillard <d@drobilla.net>2020-11-17 11:11:25 +0100
commitbd93d6d7008ed7d6eabd8f5df3d37e6f969cb183 (patch)
tree900d67b9c51e2f328cf0e6deac29a2188e872146 /lv2specgen
parent3e7abdc3da504cff2d4c14a593ad140e6fb71764 (diff)
downloadlv2-bd93d6d7008ed7d6eabd8f5df3d37e6f969cb183.tar.xz
Gracefully handle pending releases without dates
Diffstat (limited to 'lv2specgen')
-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)