From patchwork Sat Dec 28 01:29:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7761: hgweb: delete a local variable instead of setting to `None` From: phabricator X-Patchwork-Id: 44102 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 28 Dec 2019 01:29:38 +0000 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 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!")