Patchwork D7754: hgweb: delete local variable instead of setting it to `None`

login
register
mail settings
Submitter phabricator
Date Dec. 28, 2019, 1:29 a.m.
Message ID <differential-rev-PHID-DREV-bw7p57fqkopvl76ovx2k-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44097/
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/D7754

AFFECTED FILES
  mercurial/hgweb/hgwebdir_mod.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/hgweb/hgwebdir_mod.py b/mercurial/hgweb/hgwebdir_mod.py
--- a/mercurial/hgweb/hgwebdir_mod.py
+++ b/mercurial/hgweb/hgwebdir_mod.py
@@ -486,7 +486,7 @@ 
             )
             return res.sendresponse()
         finally:
-            tmpl = None
+            del tmpl
 
     def makeindex(self, req, res, tmpl, subdir=b""):
         self.refresh()