Gracefully handle the sitation if the changelog was not found

CURA-4R
This commit is contained in:
Jaime van Kessel 2020-03-18 11:17:23 +01:00
parent ced25adc2b
commit a26de5ce79
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -28,7 +28,11 @@ class TextManager(QObject):
def _loadChangeLogText(self) -> str:
# Load change log texts and organize them with a dict
file_path = Resources.getPath(Resources.Texts, "change_log.txt")
try:
file_path = Resources.getPath(Resources.Texts, "change_log.txt")
except FileNotFoundError:
# I have no idea how / when this happens, but we're getting crash reports about it.
return ""
change_logs_dict = {} # type: Dict[Version, Dict[str, List[str]]]
with open(file_path, "r", encoding = "utf-8") as f:
open_version = None # type: Optional[Version]