我每次都会收到此代码的缩进错误:
if resulttaglist[1].childNodes[0].toxml() == 0:
sys.exit
else:
subdomaintaglist = doc.getElementsByTagName('subdomain')
subdomain = subdomaintaglist[0].childNodes[0].toxml()
maindomaintaglist = doc.getElementsByTagName('DOMAIN')
maindomain = maindomaintaglist[0].childNodes[0].toxml()
domain = subdomain + '.' + maindomain
usertaglist = doc.getElementsByTagName('USER')
user = usertaglist[0].childNodes[0].toxml()
docroot, yip, alias = createvhosts.getvars(domain)
serverip = createvhosts.getmainip()
if yip == serverip:
createvhosts.writeconfshared(user, domain, docroot, yip, alias)
else:
createvhosts.writeconfded(user, domain, docroot, yip, alias)
proc = subprocess.Popen("/etc/init.d/nginx restart > /dev/null 2>&1", shell=True)
每次我试图纠正它都不起作用,谁能告诉我什么是错的?谢谢