cli: handle invalid version data

This commit is contained in:
rimu 2024-11-02 16:20:52 +13:00
parent 34a991ef7d
commit f36135d163

View file

@ -219,8 +219,8 @@ def register(app):
if instance_banned(instance.domain) or instance.domain == 'flipboard.com': if instance_banned(instance.domain) or instance.domain == 'flipboard.com':
continue continue
nodeinfo_href = instance.nodeinfo_href nodeinfo_href = instance.nodeinfo_href
if instance.software == 'lemmy' and instance.version >= '0.19.4' and instance.nodeinfo_href and instance.nodeinfo_href.endswith( if instance.software == 'lemmy' and instance.version is not None and instance.version >= '0.19.4' and \
'nodeinfo/2.0.json'): instance.nodeinfo_href and instance.nodeinfo_href.endswith('nodeinfo/2.0.json'):
nodeinfo_href = None nodeinfo_href = None
if not nodeinfo_href: if not nodeinfo_href: