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

Merge branch 'master' into 2.0

This commit is contained in:
Julien Duponchelle 2016-07-28 15:05:21 +02:00
commit 0c3a2c660a
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8
3 changed files with 7 additions and 3 deletions

View File

@ -384,7 +384,8 @@ class ProjectHandler:
response.content_length = None response.content_length = None
response.start(request) response.start(request)
for data in project.export(include_images=bool(request.GET.get("include_images", "0"))): include_images = bool(int(request.json.get("include_images", "0")))
for data in project.export(include_images=include_images):
response.write(data) response.write(data)
yield from response.drain() yield from response.drain()

View File

@ -91,7 +91,8 @@ def md5sum(path):
try: try:
with open(path + '.md5sum') as f: with open(path + '.md5sum') as f:
return f.read() return f.read()
except OSError: # Unicode error is when user rename an image to .md5sum ....
except (OSError, UnicodeDecodeError):
pass pass
try: try:

View File

@ -17,12 +17,14 @@
import sys import sys
import json import json
import jsonschema import urllib
import asyncio import asyncio
import aiohttp import aiohttp
import logging import logging
import urllib import urllib
import traceback import traceback
import jsonschema
log = logging.getLogger(__name__) log = logging.getLogger(__name__)