From 05ab2d47c7fd093847cf0752168acab9fe29e1ed Mon Sep 17 00:00:00 2001 From: DarkPhoenix Date: Tue, 8 Dec 2020 19:16:05 +0300 Subject: [PATCH] Fix error handler in a situation when gamedata metadata is not available --- gui/errorDialog.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gui/errorDialog.py b/gui/errorDialog.py index 3b5c65f50..769821091 100644 --- a/gui/errorDialog.py +++ b/gui/errorDialog.py @@ -70,7 +70,13 @@ class ErrorFrame(AuxiliaryFrame): from eos.config import gamedata_version, gamedata_date - time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S') + if gamedata_date: + try: + time = datetime.datetime.fromtimestamp(int(gamedata_date)).strftime('%Y-%m-%d %H:%M:%S') + except TypeError: + time = None + else: + time = None version = "pyfa " + config.getVersion() + '\nEVE Data Version: {} ({})\n\n'.format(gamedata_version, time) # gui.aboutData.versionString desc = _t("pyfa has experienced an unexpected issue. Below is a message that contains crucial \n"