Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from subprocess import *
import config
import codecs
import os

import six
from six import StringIO
Expand Down Expand Up @@ -280,10 +281,13 @@ def execute_external_command(command, cmd_input=None):
- output of command (String)
"""
result = ""
oldenv = os.getenv("LC_ALL", "")
os.putenv("LC_ALL", "en_US.UTF-8")
P = Popen([command], stdout=PIPE, stdin=PIPE, stderr=PIPE, shell=True)
(result, err) = P.communicate(cmd_input)
if err and config.Option.get("debug") == "on":
warning_msg(err)
os.putenv("LC_ALL", "en_US.UTF-8")

return decode_string_escape(result)

Expand Down