comparison mercurial/hgweb/wsgicgi.py @ 43993:873d0fecb9a3

hgweb: delete a local variable instead of setting to `None` The previous code was flagged by PyCharm as an unused variable assignment. Differential Revision: https://phab.mercurial-scm.org/D7761
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 27 Dec 2019 18:54:57 -0500
parents 9f70512ae2cf
children 56483ab91e66
comparison
equal deleted inserted replaced
43992:e52a9c85a7a8 43993:873d0fecb9a3
75 try: 75 try:
76 if headers_sent: 76 if headers_sent:
77 # Re-raise original exception if headers sent 77 # Re-raise original exception if headers sent
78 raise exc_info[0](exc_info[1], exc_info[2]) 78 raise exc_info[0](exc_info[1], exc_info[2])
79 finally: 79 finally:
80 exc_info = None # avoid dangling circular ref 80 del exc_info # avoid dangling circular ref
81 elif headers_set: 81 elif headers_set:
82 raise AssertionError(b"Headers already set!") 82 raise AssertionError(b"Headers already set!")
83 83
84 headers_set[:] = [status, response_headers] 84 headers_set[:] = [status, response_headers]
85 return write 85 return write