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

login
register
mail settings
Submitter phabricator
Date Dec. 28, 2019, 1:29 a.m.
Message ID <differential-rev-PHID-DREV-v7gxlocud7l6oqerlapl-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44102/
State Superseded
Headers show

Comments

phabricator - Dec. 28, 2019, 1:29 a.m.
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




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

Patch

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!")