Show More
@@ -40,6 +40,8 b' if not ispy3:' | |||||
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 | |
@@ -53,6 +55,8 b' else:' | |||||
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]) | |
55 |
|
57 | |||
|
58 | FileNotFoundError = __builtins__['FileNotFoundError'] | |||
|
59 | ||||
56 |
|
60 | |||
57 | def identity(a): |
|
61 | def identity(a): | |
58 | return a |
|
62 | return a |
@@ -71,7 +71,10 b' import abc' | |||||
71 | import os |
|
71 | import os | |
72 |
|
72 | |||
73 | from .i18n import _ |
|
73 | from .i18n import _ | |
74 |
from .pycompat import |
|
74 | from .pycompat import ( | |
|
75 | FileNotFoundError, | |||
|
76 | getattr, | |||
|
77 | ) | |||
75 | from . import ( |
|
78 | from . import ( | |
76 | config, |
|
79 | config, | |
77 | encoding, |
|
80 | encoding, | |
@@ -856,7 +859,7 b' def _readmapfile(fp, mapfile):' | |||||
856 | subresource = resourceutil.open_resource( |
|
859 | subresource = resourceutil.open_resource( | |
857 | b'mercurial.templates', rel |
|
860 | b'mercurial.templates', rel | |
858 | ) |
|
861 | ) | |
859 |
except |
|
862 | except FileNotFoundError: | |
860 | subresource = None |
|
863 | subresource = None | |
861 | else: |
|
864 | else: | |
862 | dir = templatedir() |
|
865 | dir = templatedir() |
General Comments 0
You need to be logged in to leave comments.
Login now