From 5c4f6dd3dc6704c14236880a0250a1ac447cb9ff Mon Sep 17 00:00:00 2001 From: grossmj Date: Mon, 16 Apr 2018 15:45:43 +0800 Subject: [PATCH] Do not fail a Dynamips project conversion if a file being used. --- gns3server/compute/dynamips/nodes/router.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/dynamips/nodes/router.py b/gns3server/compute/dynamips/nodes/router.py index a05e61aa..ec1a0f5c 100644 --- a/gns3server/compute/dynamips/nodes/router.py +++ b/gns3server/compute/dynamips/nodes/router.py @@ -131,14 +131,16 @@ class Router(BaseNode): 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):