abrt: detected unhandled Python exception in '/usr/local/cpanel/hooks/addondomain/addaddondomain'
代码:
#!/usr/bin/env python
import subprocess
import sys
import os
import yaml
from xml.dom import minidom
sys.path.append('/scripts')
import createvhosts
doc = minidom.parse(sys.stdin)
resulttaglist = doc.getElementsByTagName('result')
resultlist =[]
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)
我只是想知道这可能是一个python版本问题吗?
ls /usr/bin | grep python*
abrt-action-analyze-python*
python*
python2@
python2.6*
python2.6-config*
python-config@
我假设我使用的是python 2.6?
修改
这也常常永远不会发生。我注意到的另一件事是,当你执行ps -ef