Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Correct Locale settings
Browse files Browse the repository at this point in the history
This commit forces locale settings to be 'en_US.UTF-8' for iocage fixing any unintended issues with user's locale settings.
  • Loading branch information
sonicaj committed Feb 4, 2019
1 parent a91c7e7 commit f296850
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions iocage_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
"""The main CLI for ioc."""

import locale
import logging
import logging.config
import logging.handlers
Expand All @@ -38,8 +40,7 @@
from click import core

core._verify_python3_env = lambda: None
sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf8', buffering=1)
sys.stderr = open(sys.stdout.fileno(), mode='w', encoding='utf8', buffering=1)
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')

# @formatter:off
# Sometimes SIGINT won't be installed.
Expand Down

0 comments on commit f296850

Please sign in to comment.