Skip to content

Commit

Permalink
Merge branch 'issue-945' into develop
Browse files Browse the repository at this point in the history
* issue-945:
  Add issue to changelog
  Account for LC_CTYPE of UTF-8
  • Loading branch information
jamesls committed Feb 2, 2015
2 parents a5c8468 + bfdfc41 commit 86f7f52
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Next Release (TBD)
* feature:``aws elasticache wait``: Add waiters for the
``aws elasticache wait``
(`botocore issue 443 <https://github.com/boto/botocore/pull/443>`__)
* bugfix:Locale Settings: Fix issue when Mac OS X has an ``LC_CTYPE`` value
of ``UTF-8``
(`issue 945 <https://github.com/aws/aws-cli/issues/945>`__)


1.7.4
Expand Down
4 changes: 4 additions & 0 deletions bin/aws
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import sys
import os

if os.environ.get('LC_CTYPE', '') == 'UTF-8':
os.environ['LC_CTYPE'] = 'en_US.UTF-8'
import awscli.clidriver


Expand Down
7 changes: 7 additions & 0 deletions tests/integration/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@ def test_pagination_with_text_output(self):
p = aws('iam list-users --output text')
self.assertEqual(p.rc, 0)

def test_bad_lc_ctype_env_var_is_handled(self):
# Test for bad LC_CTYPE on Mac OS X.
base_env_vars = os.environ.copy()
base_env_vars['LC_CTYPE'] = 'UTF-8'
p = aws('iam list-users', env_vars=base_env_vars)
self.assertEqual(p.rc, 0)


if __name__ == '__main__':
unittest.main()

0 comments on commit 86f7f52

Please sign in to comment.