Mercurial > hg
comparison mercurial/keepalive.py @ 16705:c2d9ef43ff6c
check-code: ignore naked excepts with a "re-raise" comment
This also promotes the naked except check from a warning to an error.
author | Brodie Rao <brodie@sf.io> |
---|---|
date | Sun, 13 May 2012 13:18:06 +0200 |
parents | cfb6682961b8 |
children | 98166640b356 |
comparison
equal
deleted
inserted
replaced
16704:1f3acc30bdfe | 16705:c2d9ef43ff6c |
---|---|
288 r = h.getresponse() | 288 r = h.getresponse() |
289 # note: just because we got something back doesn't mean it | 289 # note: just because we got something back doesn't mean it |
290 # worked. We'll check the version below, too. | 290 # worked. We'll check the version below, too. |
291 except (socket.error, httplib.HTTPException): | 291 except (socket.error, httplib.HTTPException): |
292 r = None | 292 r = None |
293 except: | 293 except: # re-raises |
294 # adding this block just in case we've missed | 294 # adding this block just in case we've missed |
295 # something we will still raise the exception, but | 295 # something we will still raise the exception, but |
296 # lets try and close the connection and remove it | 296 # lets try and close the connection and remove it |
297 # first. We previously got into a nasty loop | 297 # first. We previously got into a nasty loop |
298 # where an exception was uncaught, and so the | 298 # where an exception was uncaught, and so the |