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

Fixes #3 (invalid directory in PATH).

This commit is contained in:
grossmj 2014-04-09 17:00:09 -06:00
parent 5eb72fa2f3
commit 2dc189c592

View File

@ -61,9 +61,12 @@ class IOU(IModule):
else: else:
# look for iouyap if none is defined or accessible # look for iouyap if none is defined or accessible
for path in os.environ["PATH"].split(":"): for path in os.environ["PATH"].split(":"):
try:
if "iouyap" in os.listdir(path) and os.access(os.path.join(path, "iouyap"), os.X_OK): if "iouyap" in os.listdir(path) and os.access(os.path.join(path, "iouyap"), os.X_OK):
self._iouyap = os.path.join(path, "iouyap") self._iouyap = os.path.join(path, "iouyap")
break break
except OSError:
continue
if not self._iouyap: if not self._iouyap:
log.warning("iouyap binary couldn't be found!") log.warning("iouyap binary couldn't be found!")
@ -87,15 +90,15 @@ class IOU(IModule):
self._iourc = "" self._iourc = ""
# check every 5 seconds # check every 5 seconds
#self._iou_callback = self.add_periodic_callback(self._check_iou_is_alive, 5000) self._iou_callback = self.add_periodic_callback(self._check_iou_is_alive, 5000)
#self._iou_callback.start() self._iou_callback.start()
def stop(self): def stop(self):
""" """
Properly stops the module. Properly stops the module.
""" """
#self._iou_callback.stop() self._iou_callback.stop()
# delete all IOU instances # delete all IOU instances
for iou_id in self._iou_instances: for iou_id in self._iou_instances:
iou_instance = self._iou_instances[iou_id] iou_instance = self._iou_instances[iou_id]