Skip to content

Commit

Permalink
Make locale optional (Fixes #880)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Mar 31, 2018
1 parent d97c93f commit 7eb990f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions click/_unicodefun.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ def _verify_python3_env():
extra = ''
if os.name == 'posix':
import subprocess
rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()[0]
try:
rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()[0]
except OSError:
rv = b''
good_locales = set()
has_c_utf8 = False

Expand Down

0 comments on commit 7eb990f

Please sign in to comment.