dichotomy / scorebot

Scoring Engine for CTF competitions
46 stars 22 forks source link

Bug in handling response when no games are available #39

Open dichotomy opened 7 years ago

dichotomy commented 7 years ago

2017-07-09 09:32:06-0400 [-] {"message": "SBE API: Not registered with any running Games!"} 2017-07-09 09:32:06-0400 [WebClient,client] Unhandled Error Traceback (most recent call last): File "./MonitorCore.py", line 213, in reactor.run() File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 1243, in run self.mainLoop() File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 1255, in mainLoop self.doIteration(t) File "/usr/lib/python2.7/site-packages/twisted/internet/epollreactor.py", line 235, in doPoll log.callWithLogger(selectable, _drdw, selectable, fd, event) --- --- File "/usr/lib/python2.7/site-packages/twisted/python/log.py", line 103, in callWithLogger return callWithContext({"system": lp}, func, *args, kw) File "/usr/lib/python2.7/site-packages/twisted/python/log.py", line 86, in callWithContext return context.call({ILogContext: newCtx}, func, *args, *kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 122, in callWithContext return self.currentContext().callWithContext(ctx, func, args, kw) File "/usr/lib/python2.7/site-packages/twisted/python/context.py", line 85, in callWithContext return func(*args,**kw) File "/usr/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 610, in _doReadOrWrite self._disconnectSelectable(selectable, why, inRead) File "/usr/lib/python2.7/site-packages/twisted/internet/posixbase.py", line 255, in _disconnectSelectable selectable.connectionLost(f) File "/usr/lib/python2.7/site-packages/twisted/internet/tcp.py", line 479, in connectionLost self.connector.connectionLost(reason) File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 1136, in connectionLost self.factory.clientConnectionLost(self, reason) File "/home/earnoth/Monitors/WebClient.py", line 322, in clientConnectionLost self.jobs.add(self.body) File "/home/earnoth/Monitors/Jobs.py", line 32, in add self.jobs[self.latest_job_id] = Job(job_json_str, self.debug) File "/home/earnoth/Monitors/Jobs.py", line 139, in init for service in self.json["host"]["services"]: exceptions.KeyError: 'host'