changeset 14727:d4b9d3b91ce7 stable

dispatch: check for None before closing repo We were trying to call close() if repo == None and req.repo != None. This can happen when running commands that don't take a repo.
author Idan Kamara <idankk86@gmail.com>
date Fri, 24 Jun 2011 16:30:43 +0300
parents e0039716f3ea
children 350dcd481410
files mercurial/dispatch.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Fri Jun 24 12:37:29 2011 +0200
+++ b/mercurial/dispatch.py	Fri Jun 24 16:30:43 2011 +0300
@@ -654,7 +654,7 @@
         return runcommand(lui, repo, cmd, fullargs, ui, options, d,
                           cmdpats, cmdoptions)
     finally:
-        if repo != req.repo:
+        if repo and repo != req.repo:
             repo.close()
 
 def _runcommand(ui, options, cmd, cmdfunc):