1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 19:28:07 +00:00

Clarify error message when we got UTF-8 chars in the iourc file

Fix #307
This commit is contained in:
Julien Duponchelle 2015-09-22 13:45:10 +02:00
parent 2a0f1586c8
commit c43960fbfd

View File

@ -385,7 +385,7 @@ class IOUVM(BaseVM):
except configparser.Error as e: except configparser.Error as e:
raise IOUError("Could not parse iourc file {}: {}".format(self.iourc_path, e)) raise IOUError("Could not parse iourc file {}: {}".format(self.iourc_path, e))
except UnicodeDecodeError as e: except UnicodeDecodeError as e:
raise IOUError("Invalid iourc file {}: {}".format(self.iourc_path, e)) raise IOUError("Non ascii characters in iourc file {}, please remove them: {}".format(self.iourc_path, e))
if "license" not in config: if "license" not in config:
raise IOUError("License section not found in iourc file {}".format(self.iourc_path)) raise IOUError("License section not found in iourc file {}".format(self.iourc_path))
hostname = socket.gethostname() hostname = socket.gethostname()