Show More
@@ -37,17 +37,10 except ImportError: | |||||
37 |
|
37 | |||
38 | nothing = object() |
|
38 | nothing = object() | |
39 |
|
39 | |||
40 | try: |
|
|||
41 |
|
|
40 | # Python 3 doesn't have relative imports nor level -1. | |
42 |
|
|
41 | level = -1 | |
43 |
|
|
42 | if sys.version_info[0] >= 3: | |
44 |
|
|
43 | level = 0 | |
45 | _origimport(builtins.__name__, {}, {}, None, level) |
|
|||
46 | except TypeError: # no level argument |
|
|||
47 | def _import(name, globals, locals, fromlist, level): |
|
|||
48 | "call _origimport with no level argument" |
|
|||
49 | return _origimport(name, globals, locals, fromlist) |
|
|||
50 | else: |
|
|||
51 |
|
|
44 | _import = _origimport | |
52 |
|
45 | |||
53 | def _hgextimport(importfunc, name, globals, *args): |
|
46 | def _hgextimport(importfunc, name, globals, *args): |
General Comments 0
You need to be logged in to leave comments.
Login now