Skip to content

Commit

Permalink
Do not fail a Dynamips project conversion if a file being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Apr 16, 2018
1 parent a12c5a9 commit 5c4f6dd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gns3server/compute/dynamips/nodes/router.py
Expand Up @@ -131,14 +131,16 @@ def _convert_before_2_0_0_b3(self, dynamips_id):
try:
shutil.move(path, dst)
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))):
dst = os.path.join(self._working_directory, os.path.basename(path))
if not os.path.exists(dst):
try:
shutil.move(path, dst)
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):

Expand Down

0 comments on commit 5c4f6dd

Please sign in to comment.