diff --git a/python/mozbuild/mozbuild/util.py b/python/mozbuild/mozbuild/util.py index 9917d31fb6f5..19812f4055e1 100644 --- a/python/mozbuild/mozbuild/util.py +++ b/python/mozbuild/mozbuild/util.py @@ -1414,22 +1414,6 @@ def ensure_unicode(value, encoding="utf-8"): return value -def ensure_subprocess_env(env, encoding="utf-8"): - """Ensure the environment is in the correct format for the `subprocess` - module. - - This will convert all keys and values to bytes on Python 2, and text on - Python 3. - - Args: - env (dict): Environment to ensure. - encoding (str): Encoding to use when converting to/from bytes/text - (default: utf-8). - """ - ensure = ensure_bytes if sys.version_info[0] < 3 else ensure_unicode - return {ensure(k, encoding): ensure(v, encoding) for k, v in six.iteritems(env)} - - def process_time(): if six.PY2: return time.clock()