mercurial/commandserver.py
changeset 29532 dda6bf886839
parent 29513 e5b4d79a9140
child 29542 6011ad3b0a42
--- a/mercurial/commandserver.py	Sat May 21 17:06:39 2016 +0900
+++ b/mercurial/commandserver.py	Sun May 22 11:21:11 2016 +0900
@@ -403,11 +403,14 @@
         self.ui.status(_('listening at %s\n') % self.address)
         self.ui.flush()  # avoid buffering of status message
 
+    def _cleanup(self):
+        os.unlink(self.address)
+
     def run(self):
         try:
             self.server.serve_forever()
         finally:
-            os.unlink(self.address)
+            self._cleanup()
 
 _servicemap = {
     'pipe': pipeservice,