1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Fix error when you upload an empty file

Fix #838
This commit is contained in:
Julien Duponchelle 2016-12-15 17:12:54 +01:00
parent b79235afb7
commit 60eea1f171
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -451,6 +451,8 @@ class Compute:
elif data is not None: elif data is not None:
if hasattr(data, '__json__'): if hasattr(data, '__json__'):
data = json.dumps(data.__json__()) data = json.dumps(data.__json__())
elif isinstance(data, aiohttp.streams.EmptyStreamReader):
data = None
# Stream the request # Stream the request
elif isinstance(data, aiohttp.streams.StreamReader) or isinstance(data, bytes): elif isinstance(data, aiohttp.streams.StreamReader) or isinstance(data, bytes):
chunked = True chunked = True