From: Ian Jackson Date: Sun, 23 Apr 2017 19:51:21 +0000 (+0100) Subject: hippotatd: catch errors from request.finish in _req_cancel X-Git-Tag: hippotat/1.0.0~55^2~33 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=hippotat.git;a=commitdiff_plain;h=b6c0b1bb37610c084ebcb477332ac693ea089bd6 hippotatd: catch errors from request.finish in _req_cancel It is not completely clear when it is necessary to call request.finish. Doing so when it is not necessary has a tendency to throw an exception. Signed-off-by: Ian Jackson --- diff --git a/hippotatd b/hippotatd index b08ce66..f3d88d6 100755 --- a/hippotatd +++ b/hippotatd @@ -104,7 +104,8 @@ class Client(): def _req_cancel(self, request): self._log(DBG.HTTP_CTRL, 'cancel', idof=request) - request.finish() + try: request.finish() + except Exception: pass def _req_error(self, err, request): self._log(DBG.HTTP_CTRL, 'error %s' % err, idof=request)