comparison mercurial/commandserver.py @ 40635:9683dfb6f13a

commandserver: fix reference before assignment error in pipeservice cleanup Spotted by the next patch.
author Yuya Nishihara <yuya@tcha.org>
date Wed, 07 Nov 2018 22:37:51 +0900
parents b7de186efd82
children 054d0fcba2c4
comparison
equal deleted inserted replaced
40634:5542bc9125c9 40635:9683dfb6f13a
318 def run(self): 318 def run(self):
319 ui = self.ui 319 ui = self.ui
320 # redirect stdio to null device so that broken extensions or in-process 320 # redirect stdio to null device so that broken extensions or in-process
321 # hooks will never cause corruption of channel protocol. 321 # hooks will never cause corruption of channel protocol.
322 with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout): 322 with procutil.protectedstdio(ui.fin, ui.fout) as (fin, fout):
323 sv = server(ui, self.repo, fin, fout)
323 try: 324 try:
324 sv = server(ui, self.repo, fin, fout)
325 return sv.serve() 325 return sv.serve()
326 finally: 326 finally:
327 sv.cleanup() 327 sv.cleanup()
328 328
329 def _initworkerprocess(): 329 def _initworkerprocess():