当我尝试从jenkins运行脚本时,它会显示
Atribute error: 'Config' object has no attribute 'linuxGet'
注意:-该脚本在我的本地计算机上运行正常
File "Change_DB.py", line 216, in <module>
cfg.linuxGet(ip_addr, "stream")
AttributeError: 'Config' object has no attribute 'linuxGet'
+ error=true
pin.py
class Config:
def linuxGet(self, ip_addr, file):
configFile = file
ps_path = "some command"
subprocess.Popen(ps_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Change_DB.py
import pin
cfg = pin.Config()
if os == "linux":
db.Create(ip_addr, db_linux, logFile)
cfg.linuxGet(ip_addr, "stream")
我看到Config类具有linuxGet()函数。不确定jenkins为什么找不到此函数。