[PATCH] hgweb: removed unnecessary del before function return

Martin Geisler mg at daimi.au.dk
Sat Aug 16 09:33:09 CDT 2008


# HG changeset patch
# User Martin Geisler <mg at daimi.au.dk>
# Date 1218897177 -7200
# Node ID 9f20c1de17076af372a054c7ec22d0f1c5e4e913
# Parent  11229144aa01c91cd83cfee630da400956577d38
hgweb: removed unnecessary del before function return

Deleting tmpl just before the return statement should have no effect
since tmpl goes out of scope anyway. But it confuses pyflakes who
thinks tmpl is undefined when it is used in the except blocks below.

diff -r 11229144aa01 -r 9f20c1de1707 mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py	Tue Aug 12 17:47:08 2008 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Aug 16 16:32:57 2008 +0200
@@ -168,7 +168,6 @@
                 req.respond(HTTP_OK, ctype)
 
             req.write(content)
-            del tmpl
             return []
 
         except revlog.LookupError, err:


More information about the Mercurial-devel mailing list