mercurial/server.py
changeset 31548 ce4ddcda868b
parent 30513 ff7df4bb75de
child 32005 2406dbba49bd
--- a/mercurial/server.py	Tue Mar 21 06:50:28 2017 -0700
+++ b/mercurial/server.py	Tue Mar 21 06:50:28 2017 -0700
@@ -7,7 +7,6 @@
 
 from __future__ import absolute_import
 
-import errno
 import os
 import sys
 import tempfile
@@ -60,11 +59,7 @@
                 raise error.Abort(_('child process failed to start'))
             writepid(pid)
         finally:
-            try:
-                os.unlink(lockpath)
-            except OSError as e:
-                if e.errno != errno.ENOENT:
-                    raise
+            util.tryunlink(lockpath)
         if parentfn:
             return parentfn(pid)
         else: