Mercurial > hg-stable
changeset 31554:ce4ddcda868b
server: use tryunlink
author | Ryan McElroy <rmcelroy@fb.com> |
---|---|
date | Tue, 21 Mar 2017 06:50:28 -0700 |
parents | ddadb6b0b58e |
children | 18b9d9b95719 |
files | mercurial/server.py |
diffstat | 1 files changed, 1 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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: