mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 14:01:15 +02:00
Delete vlan.dat for L2IOL during config import. Fixes #1285.
This commit is contained in:
1 parent
df7d26e418
commit
313226786f
2 files changed
+8
-9
No files matched your search
@@ -1064,6 +1064,14 @@ class IOUVM(BaseVM):
|
||||
else:
|
||||
startup_config = startup_config.replace("%h", self._name)
|
||||
f.write(startup_config)
|
||||
|
||||
vlan_file = os.path.join(self.working_dir, "vlan.dat-{:05d}".format(self.application_id))
|
||||
if os.path.exists(vlan_file):
|
||||
try:
|
||||
os.remove(vlan_file)
|
||||
except OSError as e:
|
||||
log.error("Could not delete VLAN file '{}': {}".format(vlan_file, e))
|
||||
|
||||
except OSError as e:
|
||||
raise IOUError("Can't write startup-config file '{}': {}".format(startup_config_path, e))
|
||||
|
||||
|
||||
Reference in new issue
Block a user