mercurial/chgserver.py
changeset 31545 82b3ec04b652
parent 31108 3f8f53190d6a
child 31690 2d11d278279a
equal deleted inserted replaced
31544:8a32d6352196 31545:82b3ec04b652
    38   skiphash = False
    38   skiphash = False
    39 """
    39 """
    40 
    40 
    41 from __future__ import absolute_import
    41 from __future__ import absolute_import
    42 
    42 
    43 import errno
       
    44 import hashlib
    43 import hashlib
    45 import inspect
    44 import inspect
    46 import os
    45 import os
    47 import re
    46 import re
    48 import struct
    47 import struct
   541             return
   540             return
   542         # it is possible to have a race condition here that we may
   541         # it is possible to have a race condition here that we may
   543         # remove another server's socket file. but that's okay
   542         # remove another server's socket file. but that's okay
   544         # since that server will detect and exit automatically and
   543         # since that server will detect and exit automatically and
   545         # the client will start a new server on demand.
   544         # the client will start a new server on demand.
   546         try:
   545         util.tryunlink(self._realaddress)
   547             os.unlink(self._realaddress)
       
   548         except OSError as exc:
       
   549             if exc.errno != errno.ENOENT:
       
   550                 raise
       
   551 
   546 
   552     def printbanner(self, address):
   547     def printbanner(self, address):
   553         # no "listening at" message should be printed to simulate hg behavior
   548         # no "listening at" message should be printed to simulate hg behavior
   554         pass
   549         pass
   555 
   550