首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用python连接到Rally时警告"InsecurePlatformWarning“(使用pyral)

使用python连接到Rally时警告"InsecurePlatformWarning“(使用pyral)
EN

Stack Overflow用户
提问于 2015-05-07 10:51:16
回答 1查看 324关注 0票数 1

当我通过python (pyral)连接到Rally时,我会收到以下警告。

C:\PYTHON27\lib\site-packages\requests-2.6.0-py2.7.egg\requests\packages\urllib3\util\ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning

然而,其余的都很好,但是每次发出这样的警告还是有点烦人的。

对如何解决连接“问题”或隐藏警告有什么想法吗?

我使用的代码如下:

代码语言:javascript
复制
#!/usr/bin/env python
from pyral import Rally, rallySettings, RallyRESTAPIError

#####################################
###      CONNECTION TO RALLY      ###
#####################################
#Configuration parameters
my_server = rally1.rallydev.com
my_user = "hello@world.com"
my_password    = "toto"
my_workspace   = "Sandbox"
my_project     = "My Project"
#Connect to Rally
try:
    rally = Rally(my_server, my_user, my_password, workspace=my_workspace, project=my_project)
except RallyRESTAPIError, details:
    sys.stderr.write('ERROR: %s \n\n' % details)
rally.enableLogging('rally.simple-use.log')
print "\n"
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-05-07 11:08:05

这个解决方案一直摆在我眼前(谢谢阿巴纳特!)

只需加上:

代码语言:javascript
复制
import logging
logging.basicConfig(filename='Rally.log',level=logging.NOTSET)
logging.captureWarnings(True)
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/30098960

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档