mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 04:15:12 +08:00
Gracefully handle the sitation if the changelog was not found
CURA-4R
This commit is contained in:
parent
ced25adc2b
commit
a26de5ce79
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user