1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Catch exception: ZIP does not support timestamps before 1980. Ref #1360.

This commit is contained in:
grossmj 2018-07-26 13:34:23 -05:00
parent e20e885d44
commit d0ed6931d8
2 changed files with 2 additions and 2 deletions

View File

@ -931,7 +931,7 @@ class Project:
yield from wait_run_in_executor(self._create_duplicate_project_file, project_path, zipstream)
with open(project_path, "rb") as f:
project = yield from import_project(self._controller, str(uuid.uuid4()), f, location=location, name=name, keep_compute_id=True)
except (OSError, UnicodeEncodeError) as e:
except (ValueError, OSError, UnicodeEncodeError) as e:
raise aiohttp.web.HTTPConflict(text="Can not duplicate project: {}".format(str(e)))
if previous_status == "closed":

View File

@ -54,7 +54,7 @@ class UDPLink(Link):
try:
(node1_host, node2_host) = yield from node1.compute.get_ip_on_same_subnet(node2.compute)
except ValueError as e:
raise aiohttp.web.HTTPConflict(text=str(e))
raise aiohttp.web.HTTPConflict(text="Cannot get an IP address on same subnet: {}".format(e))
# Reserve a UDP port on both side
response = yield from node1.compute.post("/projects/{}/ports/udp".format(self._project.id))