Submitter | Ryan McElroy |
---|---|
Date | March 21, 2017, 1:54 p.m. |
Message ID | <684d201e116b65e6dff5.1490104471@devbig314.prn1.facebook.com> |
Download | mbox | patch |
Permalink | /patch/19526/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/server.py b/mercurial/server.py --- a/mercurial/server.py +++ b/mercurial/server.py @@ -7,7 +7,6 @@ from __future__ import absolute_import -import errno import os import sys import tempfile @@ -60,11 +59,7 @@ def runservice(opts, parentfn=None, init 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: