Mercurial > hg
comparison mercurial/hgweb/hgwebdir_mod.py @ 43986:71582c5ad00f
hgweb: delete local variable instead of setting it to `None`
The previous code was flagged by PyCharm as an unused variable assignment.
Differential Revision: https://phab.mercurial-scm.org/D7754
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 27 Dec 2019 18:19:40 -0500 |
parents | 29adf0a087a1 |
children | bf23d6ee7ec7 |
comparison
equal
deleted
inserted
replaced
43985:cd96eccd1ce1 | 43986:71582c5ad00f |
---|---|
484 res.setbodygen( | 484 res.setbodygen( |
485 tmpl.generate(b'error', {b'error': e.message or b''}) | 485 tmpl.generate(b'error', {b'error': e.message or b''}) |
486 ) | 486 ) |
487 return res.sendresponse() | 487 return res.sendresponse() |
488 finally: | 488 finally: |
489 tmpl = None | 489 del tmpl |
490 | 490 |
491 def makeindex(self, req, res, tmpl, subdir=b""): | 491 def makeindex(self, req, res, tmpl, subdir=b""): |
492 self.refresh() | 492 self.refresh() |
493 sortable = [b"name", b"description", b"contact", b"lastchange"] | 493 sortable = [b"name", b"description", b"contact", b"lastchange"] |
494 sortcolumn, descending = None, False | 494 sortcolumn, descending = None, False |