Commit cf7f15cf authored by Michael Büsch's avatar Michael Büsch

util: Add helper to clear LANG in environment

Signed-off-by: Michael Büsch's avatarMichael Buesch <>
parent 63b0e506
......@@ -199,3 +199,17 @@ def bytesToHexStr(_bytes):
if _bytes is None:
return None
return binascii.b2a_hex(_bytes).decode("ascii")
def envClearLang(env, lang = "C"):
"""Reset the language settings of an environment dict
to some expected value and return the result.
env = dict(env)
env["LANG"] = lang
env.pop(i, None)
return env
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment