commit c10f9211b7d96cc36e47692965424a43887abdaa Author: Vaydheesh Date: Tue Apr 9 12:12:48 2019 +0530 Replaced: os.putenv, os.getenv os.environ diff --git a/apertium/utils.py b/apertium/utils.py index 5f716c8..7599844 100644 --- a/apertium/utils.py +++ b/apertium/utils.py @@ -43,12 +43,12 @@ def execute(inp, commands): # type: (str, List[List[str]]) -> str # Adding the Apertium Binaries to Process' PATH if platform.system() == 'Windows': - install_path = os.getenv('LOCALAPPDATA') - current = os.getenv('path') + install_path = os.environ['LOCALAPPDATA'] + current = os.environ['path'] apertium_path = os.path.join(install_path, 'apertium-all-dev', 'bin') if os.path.isdir(apertium_path): - update = '{}{};'.format(current, apertium_path) - os.putenv('path', update) + update_path = '{}{};'.format(current, apertium_path) + os.environ['path'] = update_path for i, command in enumerate(commands): procs.append( subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE),