Make sure non-optional properties are present

This commit is contained in:
Louis-Philippe Huberdeau 2017-07-20 08:50:03 -04:00
parent facc54f60b
commit 3c5ee552f0

View File

@ -72,7 +72,11 @@ class Entry:
"request": self.request.toDict(), "request": self.request.toDict(),
"response": self.response.toDict(), "response": self.response.toDict(),
"cache": {}, "cache": {},
"timings": {}, "timings": {
"send": -1,
"wait": -1,
"receive": -1,
},
"time": int(1000 * (self.endTime - self.startTime)), "time": int(1000 * (self.endTime - self.startTime)),
"startedDateTime": "%s%s" % (datetime.datetime.fromtimestamp(self.startTime).isoformat(), time.strftime("%z")) if self.startTime else None "startedDateTime": "%s%s" % (datetime.datetime.fromtimestamp(self.startTime).isoformat(), time.strftime("%z")) if self.startTime else None
} }