quixey / python-aliyun

Python API client for Aliyun, the Alibaba Cloud.
Apache License 2.0
37 stars 24 forks source link

When stdin is not a file, no calls to connection.get() succeed #2

Closed addumb closed 10 years ago

addumb commented 10 years ago
File "/usr/local/lib/python2.7/dist-packages/aliyun/connection.py", line 131, in _percent_encode
  request.decode(sys.stdin.encoding).encode('utf8'),

TypeError: decode() argument 1 must be string, not None

https://mail.python.org/pipermail/python-list/2010-August/584517.html says we should use sys.stdin.encoding and fall-through to sys.getdefaultencoding()

addumb commented 10 years ago

Fixed in https://github.com/quixey/python-aliyun/commit/673ac7c97b7b525bb9b98b107c2c6482b9fd770a