Skip to content

Commit 1673a0e

Browse files
committed
Merge pull request #104 from dtynn/feature/useragent
Feature/useragent
2 parents a406f96 + 1df7c33 commit 1673a0e

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
## CHANGE LOG
22

3+
### v6.1.6
4+
5+
2014-04-15 issue [#104](https://github.com/qiniu/python-sdk/pull/104)
6+
- [#100] 遵循PEP8语法规范
7+
- [#101] 增加pyflakes语法检测
8+
- [#103] 错误信息中加入Reqid信息,以便追溯
9+
- [#104] 完善User-Agent头信息,以便追溯
10+
311
### v6.1.5
412

513
2014-04-08 issue [#98](https://github.com/qiniu/python-sdk/pull/98)

qiniu/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
'''
88

99
# -*- coding: utf-8 -*-
10-
__version__ = '6.1.4'
10+
__version__ = '6.1.6'

qiniu/conf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,9 @@
88
UP_HOST = "up.qiniu.com"
99

1010
from . import __version__
11-
USER_AGENT = "qiniu python-sdk v%s" % __version__
11+
import platform
12+
13+
sys_info = "%s/%s" % (platform.system(), platform.machine())
14+
py_ver = platform.python_version()
15+
16+
USER_AGENT = "QiniuPython/%s (%s) Python/%s" % (__version__, sys_info, py_ver)

qiniu/rpc.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,9 @@ def call_with(self, path, body, content_type=None, content_length=None):
4343
if resp.status / 100 != 2:
4444
err_msg = ret if "error" not in ret else ret["error"]
4545
reqid = resp.getheader("X-Reqid", None)
46-
detail = resp.getheader("x-log", None)
46+
# detail = resp.getheader("x-log", None)
4747
if reqid is not None:
4848
err_msg += ", reqid:%s" % reqid
49-
if detail is not None:
50-
err_msg += ", detail:%s" % detail
5149

5250
return None, err_msg
5351

0 commit comments

Comments
 (0)