diff --git a/gns3server/main.py b/gns3server/main.py index d6fb969d..985e066b 100644 --- a/gns3server/main.py +++ b/gns3server/main.py @@ -171,7 +171,12 @@ def main(): host = server_config["host"] port = int(server_config["port"]) server = Server(host, port) - server.run() + try: + server.run() + except Exception as e: + log.critical("Critical error while running the server: {}".format(e), exc_info=1) + # TODO: send exception to Sentry + return if __name__ == '__main__': main() diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index 0a517936..8a339c72 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -179,8 +179,9 @@ class Dynamips(BaseManager): :param project: Project instance """ - for vm in project.vms: - yield from vm.hypervisor.set_working_dir(project.module_working_directory(self.module_name.lower())) + for vm in self._vms: + if vm.project.id == project.id: + yield from vm.hypervisor.set_working_dir(project.module_working_directory(self.module_name.lower())) for device in self._devices.values(): if device.project.id == project.id: diff --git a/gns3server/version.py b/gns3server/version.py index f650a7bf..45a27e85 100644 --- a/gns3server/version.py +++ b/gns3server/version.py @@ -23,5 +23,5 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "1.3.dev1" +__version__ = "1.3.dev2" __version_info__ = (1, 3, 0, 0)