一些小点点

 

1.python中处理数据时,需要用到value为字典或者列表的可迭代数据类型:

 

dic.setdefault(key,[]).append(value)

dic.setdefault(key,{}).append(value)

 

2.jenkins2.121.3 这个版本配置节点的时候启动方法里面没有Launch agent via Java Web Start,其启动方法为-回到系统管理,点击Configure Global Security,代理项中选择:随机选取 ,保存即可!

 

 

进入节点管理页面,启动方法中发现出现了:Launch agent via Java Web Start 的选项:

3.jenkins 启动slave-agent.jnlp 失败 因为Jenkins的系统配置URL错误:

 

更改为IP地址:http://10.X.X.X:8080/jenkins/  保存后再启动 slave-agent.jnlp,发现成功连接。 

D:\path>javaws http://localhost:8080/jenkins/computer/FRHD_Shaop/slave-agent.jnlp

 4.requests设置移除SSL认证的时候,控制台会抛出以下警告:

D:\Python\Python27\python.exe E:/Git/ZZZZZZ_Project/new_pro/auto_cmbnt/business/script/test_upload_file.py
D:\Python\Python27\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
D:\Python\Python27\lib\site-packages\urllib3\connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
{u'body': {u'fileUrl':

哥哥告诉我:

from requests.packages.urllib3.exceptions import InsecureRequestWarning
# 禁用安全请求警告
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
即可。

 5 js修改属性:

'var js = document.getElementById("applicantBirthday");js.removeAttribute('readonly');js.value = "20170605"'

6 工作愿意一直在使用python2,unicode编码困扰:

# 将Unicode转化为普通Python字符串:"encode"  
# 将普通Python字符串转化为Unicode:"decode"  

>>> a
'nishi'
>>> type(a)
<type 'str'>
>>> s =a.decode('utf-8')
>>> type(s)
<type 'unicode'>
>>> d =s.encode('ascii')
>>> type(d)
<type 'str'>

 

posted @ 2018-09-13 15:32  HelloG  阅读(166)  评论(0)    收藏  举报