зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1576097 - Remove mozbuild.util.encode again. r=nalexander
This time, existing config.status trying to import it will throw an exception that will trigger a re-configure. Differential Revision: https://phabricator.services.mozilla.com/D43215 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
9f1da4f63d
Коммит
aff45da04a
|
@ -23,7 +23,6 @@ import sys
|
|||
import time
|
||||
|
||||
from collections import (
|
||||
Iterable,
|
||||
OrderedDict,
|
||||
)
|
||||
from io import (
|
||||
|
@ -1297,24 +1296,6 @@ def indented_repr(o, indent=4):
|
|||
return ''.join(recurse_indented_repr(o, 0))
|
||||
|
||||
|
||||
# Please do not use this function. It's only kept for backwards compatibility
|
||||
# with older config.status files that may lay around before a CLOBBER.
|
||||
def encode(obj, encoding='utf-8'):
|
||||
'''Recursively encode unicode strings with the given encoding.'''
|
||||
if isinstance(obj, dict):
|
||||
return {
|
||||
encode(k, encoding): encode(v, encoding)
|
||||
for k, v in six.iteritems(obj)
|
||||
}
|
||||
if isinstance(obj, bytes):
|
||||
return obj
|
||||
if isinstance(obj, six.text_type):
|
||||
return obj.encode(encoding)
|
||||
if isinstance(obj, Iterable):
|
||||
return [encode(i, encoding) for i in obj]
|
||||
return obj
|
||||
|
||||
|
||||
def patch_main():
|
||||
'''This is a hack to work around the fact that Windows multiprocessing needs
|
||||
to import the original main module, and assumes that it corresponds to a file
|
||||
|
|
Загрузка…
Ссылка в новой задаче