commit 9d1ebe7cb7060265e3603d9182d30d0a05c63bd0 Author: Vaydheesh Date: Tue Apr 9 12:35:51 2019 +0530 Added: ';' while updating path values generate logs while updating path diff --git a/apertium/utils.py b/apertium/utils.py index 7599844..38d1aa6 100644 --- a/apertium/utils.py +++ b/apertium/utils.py @@ -2,11 +2,12 @@ import subprocess import re import platform import os - +import logging if False: from typing import List, Dict, Tuple, Union # noqa: F401 + import apertium # noqa: F401 from apertium.iso639 import iso_639_codes # noqa: F401 @@ -45,10 +46,14 @@ def execute(inp, commands): # type: (str, List[List[str]]) -> str if platform.system() == 'Windows': install_path = os.environ['LOCALAPPDATA'] current = os.environ['path'] + logging.info('Currennt path is %s', os.environ['path']) + apertium_path = os.path.join(install_path, 'apertium-all-dev', 'bin') if os.path.isdir(apertium_path): - update_path = '{}{};'.format(current, apertium_path) + update_path = '{};{};'.format(current, apertium_path) os.environ['path'] = update_path + logging.info('Updated path is %s', os.environ['path']) + for i, command in enumerate(commands): procs.append( subprocess.Popen(command, stdin=subprocess.PIPE, stdout=subprocess.PIPE),