mercurial/pycompat.py
branchstable
changeset 47857 2b76255a4f74
parent 46570 7a29d9002250
child 48006 1fda8c9358ce
equal deleted inserted replaced
47856:142a76127e3a 47857:2b76255a4f74
    38     from .thirdparty.concurrent import futures
    38     from .thirdparty.concurrent import futures
    39 
    39 
    40     def future_set_exception_info(f, exc_info):
    40     def future_set_exception_info(f, exc_info):
    41         f.set_exception_info(*exc_info)
    41         f.set_exception_info(*exc_info)
    42 
    42 
       
    43     # this is close enough for our usage
       
    44     FileNotFoundError = OSError
    43 
    45 
    44 else:
    46 else:
    45     import concurrent.futures as futures
    47     import concurrent.futures as futures
    46     import http.cookiejar as cookielib
    48     import http.cookiejar as cookielib
    47     import http.client as httplib
    49     import http.client as httplib
    50     import socketserver
    52     import socketserver
    51     import xmlrpc.client as xmlrpclib
    53     import xmlrpc.client as xmlrpclib
    52 
    54 
    53     def future_set_exception_info(f, exc_info):
    55     def future_set_exception_info(f, exc_info):
    54         f.set_exception(exc_info[0])
    56         f.set_exception(exc_info[0])
       
    57 
       
    58     FileNotFoundError = __builtins__['FileNotFoundError']
    55 
    59 
    56 
    60 
    57 def identity(a):
    61 def identity(a):
    58     return a
    62     return a
    59 
    63