##// END OF EJS Templates
perf: handle NameError for `pycompat.foo` when pycompat wasn't imported...
Martin von Zweigbergk -
r43051:c8d3af9c default
parent child Browse files
Show More
@@ -132,7 +132,7 b' try:'
132 132 _maxint = sys.maxsize # per py3 docs for replacing maxint
133 133 else:
134 134 _maxint = sys.maxint
135 except (ImportError, AttributeError):
135 except (NameError, ImportError, AttributeError):
136 136 import inspect
137 137 getargspec = inspect.getargspec
138 138 _byteskwargs = identity
@@ -144,11 +144,11 b' except (ImportError, AttributeError):'
144 144 try:
145 145 # 4.7+
146 146 queue = pycompat.queue.Queue
147 except (AttributeError, ImportError):
147 except (NameError, AttributeError, ImportError):
148 148 # <4.7.
149 149 try:
150 150 queue = pycompat.queue
151 except (AttributeError, ImportError):
151 except (NameError, AttributeError, ImportError):
152 152 queue = util.queue
153 153
154 154 try:
General Comments 0
You need to be logged in to leave comments. Login now