diff mercurial/hgweb/hgweb_mod.py @ 4915:97b734fb9c6f

Use try/finally pattern to cleanup locks and transactions
author Matt Mackall <mpm@selenic.com>
date Sat, 21 Jul 2007 16:02:10 -0500
parents d9e385a7a806
children 79373ec3f27d
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Sat Jul 21 16:02:09 2007 -0500
+++ b/mercurial/hgweb/hgweb_mod.py	Sat Jul 21 16:02:10 2007 -0500
@@ -1168,7 +1168,7 @@
                     req.write('%d\n' % ret)
                     req.write(val)
                 finally:
-                    lock.release()
+                    del lock
             except (OSError, IOError), inst:
                 req.write('0\n')
                 filename = getattr(inst, 'filename', '')