Fix freezing issues on Windows.

This commit is contained in:
grossmj 2014-03-30 16:25:56 -06:00
parent 30c465b51e
commit bb2c25da5c
2 changed files with 6 additions and 3 deletions

View File

@ -18,10 +18,10 @@
import sys import sys
from .base import IModule from .base import IModule
from .dynamips import Dynamips from .dynamips import Dynamips
from .iou import IOU
MODULES = [Dynamips] MODULES = [Dynamips]
if sys.platform.startswith("linux"): if sys.platform.startswith("linux"):
# IOU runs only on Linux # IOU runs only on Linux
from .iou import IOU
MODULES.append(IOU) MODULES.append(IOU)

View File

@ -19,6 +19,7 @@
Dynamips server module. Dynamips server module.
""" """
import sys
import os import os
import base64 import base64
import tempfile import tempfile
@ -116,8 +117,10 @@ class Dynamips(IModule):
self._dynamips = "" self._dynamips = ""
self._default_host = "0.0.0.0" self._default_host = "0.0.0.0"
self._callback = self.add_periodic_callback(self._check_hypervisors, 5000) if not sys.platform.startswith("win32"):
self._callback.start() #FIXME: pickle issues Windows
self._callback = self.add_periodic_callback(self._check_hypervisors, 5000)
self._callback.start()
def stop(self): def stop(self):
""" """