From 4de09400c59dfc746b83556fe20ceda5c63eccd7 Mon Sep 17 00:00:00 2001 From: Glutanimate Date: Mon, 8 Apr 2019 17:51:15 +0200 Subject: [PATCH] Fix timestamp comparison failing when update API returns null Addresses a rare instance of update checks failing when locally installed packages point to a shared ID that has yet to be updated to 2.1. In those instances Anki's update API returns null, which causes a ValueError downstream when comparing the timestamps against each other. --- aqt/addons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/addons.py b/aqt/addons.py index 17a555575..933b9b244 100644 --- a/aqt/addons.py +++ b/aqt/addons.py @@ -325,7 +325,7 @@ Are you sure you want to continue?""" updated = [] for dir, ts in mods: sid = str(dir) - if self.addonMeta(sid).get("mod",0) < ts: + if self.addonMeta(sid).get("mod", 0) < (ts or 0): updated.append(sid) return updated