Save the GNS3 VM settings even if the GNS3 VM cannot be stopped.

This commit is contained in:
grossmj committed 2019-03-18 15:30:59 +07:00
1 parent 3a73d01547
commit 4e396ac690
2 files changed
+7 -3

No files matched your search

+5 -3
View File
@@ -212,9 +212,11 @@ class GNS3VM:
new_settings = copy.copy(self._settings)
new_settings.update(settings)
if self.settings != new_settings:
await self._stop()
self._settings = settings
self._controller.save()
try:
await self._stop()
finally:
self._settings = settings
self._controller.save()
if self.enable:
await self.start()
else: