mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
py2: cast env keys to bytes
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ def daemon(args):
|
||||
|
||||
env = fix_env()
|
||||
file_path = os.path.abspath(inspect.stack()[0][1])
|
||||
env["PYTHONPATH"] = cast_bytes_py2(
|
||||
env[cast_bytes_py2("PYTHONPATH")] = cast_bytes_py2(
|
||||
os.path.dirname(os.path.dirname(file_path))
|
||||
)
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ def fix_env(env=None):
|
||||
lp_orig = env.get(lp_key + "_ORIG", None)
|
||||
if lp_orig is not None:
|
||||
# NOTE: py2 doesn't like unicode strings in environ
|
||||
env[lp_key] = cast_bytes_py2(lp_orig)
|
||||
env[cast_bytes_py2(lp_key)] = cast_bytes_py2(lp_orig)
|
||||
else:
|
||||
env.pop(lp_key, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user