mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-11 16:41:04 +00:00
Do not fail a Dynamips project conversion if a file being used.
This commit is contained in:
parent
a12c5a95b0
commit
5c4f6dd3dc
@ -131,14 +131,16 @@ class Router(BaseNode):
|
|||||||
try:
|
try:
|
||||||
shutil.move(path, dst)
|
shutil.move(path, dst)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise DynamipsError("Can't move {}: {}".format(path, str(e)))
|
log.error("Can't move {}: {}".format(path, str(e)))
|
||||||
|
continue
|
||||||
for path in glob.glob(os.path.join(glob.escape(dynamips_dir), "*_i{}_*".format(dynamips_id))):
|
for path in glob.glob(os.path.join(glob.escape(dynamips_dir), "*_i{}_*".format(dynamips_id))):
|
||||||
dst = os.path.join(self._working_directory, os.path.basename(path))
|
dst = os.path.join(self._working_directory, os.path.basename(path))
|
||||||
if not os.path.exists(dst):
|
if not os.path.exists(dst):
|
||||||
try:
|
try:
|
||||||
shutil.move(path, dst)
|
shutil.move(path, dst)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
raise DynamipsError("Can't move {}: {}".format(path, str(e)))
|
log.error("Can't move {}: {}".format(path, str(e)))
|
||||||
|
continue
|
||||||
|
|
||||||
def __json__(self):
|
def __json__(self):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user