Handle invalid install timestamps in add-ons
https://forums.ankiweb.net/t/anki-23-12-beta/37771/57
This commit is contained in:
parent
80c5f2d491
commit
25bc32b1e2
|
@ -292,10 +292,14 @@ class ErrorHandler(QObject):
|
|||
|
||||
|
||||
def addon_fmt(addmgr: AddonManager, addon: AddonMeta) -> str:
|
||||
installed = "0"
|
||||
if addon.installed_at:
|
||||
installed = time.strftime("%Y-%m-%dT%H:%M", time.localtime(addon.installed_at))
|
||||
else:
|
||||
installed = "0"
|
||||
try:
|
||||
installed = time.strftime(
|
||||
"%Y-%m-%dT%H:%M", time.localtime(addon.installed_at)
|
||||
)
|
||||
except OverflowError:
|
||||
print("invalid timestamp for", addon.provided_name)
|
||||
if addon.provided_name:
|
||||
name = addon.provided_name
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue