Fixes #1068 - handle zipfile encoding issues at project duplication

This commit is contained in:
ziajka authored and Julien Duponchelle committed 2017-06-09 15:32:25 +02:00
1 parent 5c0d955156
commit 64a852f38f
2 files changed
+11 -1

No files matched your search

+1 -1
View File
@@ -714,7 +714,7 @@ class Project:
f.write(data)
with open(os.path.join(tmpdir, "project.gns3p"), "rb") as f:
project = yield from import_project(self._controller, str(uuid.uuid4()), f, location=location, name=name, keep_compute_id=True)
except OSError as e:
except (OSError, UnicodeEncodeError) as e:
raise aiohttp.web.HTTPConflict(text="Can not duplicate project: {}".format(str(e)))
if previous_status == "closed":