From 30f10a559e5ef64988a2ac89cbc120d71d05e325 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 5 Feb 2015 16:34:18 +0100 Subject: [PATCH] Fix crash in debug log --- gns3server/web/response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gns3server/web/response.py b/gns3server/web/response.py index 366b8a6c..9ae3c1a6 100644 --- a/gns3server/web/response.py +++ b/gns3server/web/response.py @@ -43,7 +43,7 @@ class Response(aiohttp.web.Response): log.debug("%s", request.json) log.info("Response: %d %s", self.status, self.reason) log.debug(dict(self.headers)) - if hasattr(self, 'body'): + if hasattr(self, 'body') and self.body is not None: log.debug(json.loads(self.body.decode('utf-8'))) return super().start(request)