From bb2c25da5c522f7bea7ffe95e0430c95f9f2ea3e Mon Sep 17 00:00:00 2001 From: grossmj Date: Sun, 30 Mar 2014 16:25:56 -0600 Subject: [PATCH] Fix freezing issues on Windows. --- gns3server/modules/__init__.py | 2 +- gns3server/modules/dynamips/__init__.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gns3server/modules/__init__.py b/gns3server/modules/__init__.py index 5ff0caac..59304d19 100644 --- a/gns3server/modules/__init__.py +++ b/gns3server/modules/__init__.py @@ -18,10 +18,10 @@ import sys from .base import IModule from .dynamips import Dynamips -from .iou import IOU MODULES = [Dynamips] if sys.platform.startswith("linux"): # IOU runs only on Linux + from .iou import IOU MODULES.append(IOU) diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index a3ba093b..34c4a6f0 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -19,6 +19,7 @@ Dynamips server module. """ +import sys import os import base64 import tempfile @@ -116,8 +117,10 @@ class Dynamips(IModule): self._dynamips = "" self._default_host = "0.0.0.0" - self._callback = self.add_periodic_callback(self._check_hypervisors, 5000) - self._callback.start() + if not sys.platform.startswith("win32"): + #FIXME: pickle issues Windows + self._callback = self.add_periodic_callback(self._check_hypervisors, 5000) + self._callback.start() def stop(self): """