mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-25 01:38:08 +00:00
Fixes issue when IOURC environment variable is set to None.
This commit is contained in:
parent
879ed9e4e6
commit
c7034c25ef
@ -380,8 +380,6 @@ class IOUVM(BaseVM):
|
|||||||
return
|
return
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
if self.iourc_path is None:
|
|
||||||
raise IOUError("Could not found iourc file")
|
|
||||||
try:
|
try:
|
||||||
with open(self.iourc_path) as f:
|
with open(self.iourc_path) as f:
|
||||||
config.read_file(f)
|
config.read_file(f)
|
||||||
@ -439,8 +437,10 @@ class IOUVM(BaseVM):
|
|||||||
self._rename_nvram_file()
|
self._rename_nvram_file()
|
||||||
|
|
||||||
iourc_path = self.iourc_path
|
iourc_path = self.iourc_path
|
||||||
if iourc_path and not os.path.isfile(iourc_path):
|
if iourc_path is None:
|
||||||
raise IOUError("A valid iourc file is necessary to start IOU")
|
raise IOUError("Could not find a iourc file (IOU license)")
|
||||||
|
if not os.path.isfile(iourc_path):
|
||||||
|
raise IOUError("The iourc path '{}' is not a regular file".format(iourc_path))
|
||||||
|
|
||||||
yield from self._check_iou_licence()
|
yield from self._check_iou_licence()
|
||||||
iouyap_path = self.iouyap_path
|
iouyap_path = self.iouyap_path
|
||||||
|
Loading…
Reference in New Issue
Block a user