зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1550956: Import builtins in Python 3 compatible way r=firefox-build-system-reviewers,chmanchester
Differential Revision: https://phabricator.services.mozilla.com/D30790 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
de7c51b158
Коммит
bead355959
|
@ -11,7 +11,10 @@ import platform
|
|||
import subprocess
|
||||
import sys
|
||||
import uuid
|
||||
import __builtin__
|
||||
if sys.version_info[0] < 3:
|
||||
import __builtin__ as builtins
|
||||
else:
|
||||
import builtins
|
||||
|
||||
from types import ModuleType
|
||||
|
||||
|
@ -434,4 +437,4 @@ class ImportHook(object):
|
|||
|
||||
|
||||
# Install our hook
|
||||
__builtin__.__import__ = ImportHook(__builtin__.__import__)
|
||||
builtins.__import__ = ImportHook(builtins.__import__)
|
||||
|
|
Загрузка…
Ссылка в новой задаче