1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 08:30:57 +00:00

Ignore Unicode errors when reading base config file contents.

This commit is contained in:
grossmj 2019-05-29 15:43:17 +07:00
parent 99886d3f0c
commit a860243531

View File

@ -175,7 +175,7 @@ class Node:
if not os.path.isabs(path):
path = os.path.join(self.project.controller.configs_path(), path)
try:
with open(path, encoding="utf-8") as f:
with open(path, encoding="utf-8", errors="ignore") as f:
return f.read()
except OSError:
return None