Python AttributeError:索引

2024-10-02 02:25:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我被困在这里。。。在

连接到t3://本地主机:7001用户标识weblogic。。。 已成功连接到属于域“wl\u Server”的管理服务器“examplesServer”。在

警告:使用了不安全的协议连接到 服务器。为确保在线安全,SSL端口或 应该改用管理端口。在

在 [MBeanServerInvocationHandler]com.bea公司:Name=mainWebApp,Type=AppDeployment ParcelLienData.战争 帕塞利兰塔 P 调用WLST-Traceback(最里面的最后一个)时出现问题: 文件“D:\RM Share\RM Scripts\wl_deploy_localhost”-WC.py公司“,第30行,在吗? AttributeError:索引

我的代码看起来像:

import sys 
import getopt
import os

loadProperties(sys.argv[1] +".props")
connect(username,password,adminUrl)

cmd = "awk -F'Name=' '{print $2}' | awk -F',' '{print $1}'"

f = open(r'./applicationsList.txt','r')
#In Above line you can specify the Complete Path of the "applications.txt" as well

print f
for i in range(5):
       line=f.readline()
       line1=line[:-4]
       line2=line1[:1]
       #check if the service or application is already present on the server...
       cd('AppDeployments')
       myapps=cmo.getAppDeployments()
       for dep_file in myapps:
          print depfile
          print line
          print line1
          print line2
          num1=depfile.index(line2)
          print num1
          num2=depfile.index(",", num1)
          print num2
          appName=depfile[num1:num2]
          print appName

          if appName == "line1":
             print Redeploy
          elif appName != "line1":
             print "Not deploying"
             continue
          else:
             print Deploying

请告诉我,我哪里错了。。。。在

谢谢。。。。在


Tags: the端口nameimport服务器line公司print

热门问题