Skip to content

Commit

Permalink
Implemented changes suggested
Browse files Browse the repository at this point in the history
Removed: from os import path
Edited: Process' Path comment
  • Loading branch information
singh-lokendra committed Apr 7, 2019
1 parent 20d31fa commit 598a360
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apertium/utils.py
Expand Up @@ -2,7 +2,6 @@
import re
import platform
import os
from os import path


if False:
Expand Down Expand Up @@ -42,12 +41,12 @@ def execute(inp, commands): # type: (str, List[List[str]]) -> str
procs = []
end = inp.encode()

# Adding the Apertium Binaries to PATH
# Adding the Apertium Binaries to Process' PATH
if platform.system() == 'Windows':
install_path = os.getenv('LOCALAPPDATA')
current = os.getenv('path')
apertium_path = path.join(install_path, 'apertium-all-dev', 'bin')
if path.isdir(apertium_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)
for i, command in enumerate(commands):
Expand Down

0 comments on commit 598a360

Please sign in to comment.