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

Show hostname when the hostname is missing in the iourc.txt

This commit is contained in:
Julien Duponchelle 2016-01-13 16:37:50 +01:00
parent bc3016eec5
commit ba4128f57b

View File

@ -400,7 +400,7 @@ class IOUVM(BaseVM):
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()
if hostname not in config["license"]: if hostname not in config["license"]:
raise IOUError("Hostname key not found in iourc file {}".format(self.iourc_path)) raise IOUError("Hostname \"{}\" not found in iourc file {}".format(hostname, self.iourc_path))
user_ioukey = config["license"][hostname] user_ioukey = config["license"][hostname]
if user_ioukey[-1:] != ';': if user_ioukey[-1:] != ';':
raise IOUError("IOU key not ending with ; in iourc file".format(self.iourc_path)) raise IOUError("IOU key not ending with ; in iourc file".format(self.iourc_path))