D7761: hgweb: delete a local variable instead of setting to `None`

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Fri Dec 27 20:29:38 EST 2019


mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The previous code was flagged by PyCharm as an unused variable assignment.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D7761

AFFECTED FILES
  mercurial/hgweb/wsgicgi.py

CHANGE DETAILS

diff --git a/mercurial/hgweb/wsgicgi.py b/mercurial/hgweb/wsgicgi.py
--- a/mercurial/hgweb/wsgicgi.py
+++ b/mercurial/hgweb/wsgicgi.py
@@ -77,7 +77,7 @@
                     # Re-raise original exception if headers sent
                     raise exc_info[0](exc_info[1], exc_info[2])
             finally:
-                exc_info = None  # avoid dangling circular ref
+                del exc_info  # avoid dangling circular ref
         elif headers_set:
             raise AssertionError(b"Headers already set!")
 



To: mharbison72, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list