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

Fix No such file or directory when duplicate a project using Vbox linked clone hdd_info.json

Fix #1185
This commit is contained in:
Julien Duponchelle 2016-11-02 12:50:10 +01:00
parent ce5ff93242
commit 21ec2a6271
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -357,7 +357,8 @@ class VirtualBoxVM(BaseNode):
with open(hdd_info_file, "r", encoding="utf-8") as f: with open(hdd_info_file, "r", encoding="utf-8") as f:
hdd_table = json.load(f) hdd_table = json.load(f)
except (ValueError, OSError) as e: except (ValueError, OSError) as e:
raise VirtualBoxError("Could not read HDD info file: {}".format(e)) # The VM has never be started
return
for hdd_info in hdd_table: for hdd_info in hdd_table:
hdd_file = os.path.join(self.working_dir, self._vmname, "Snapshots", hdd_info["hdd"]) hdd_file = os.path.join(self.working_dir, self._vmname, "Snapshots", hdd_info["hdd"])