Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

unhandled Python exception in addondomain hook

Discussion in 'General Discussion' started by fightforfreedom, Jan 24, 2013.

  1. fightforfreedom

    Joined:
    Jan 21, 2013
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    abrt: detected unhandled Python exception in '/usr/local/cpanel/hooks/addondomain/addaddondomain'

    Code:
    #!/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)
    could this be from a python update?
     
  2. fightforfreedom

    Joined:
    Jan 21, 2013
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    the python scripts stay in the ps -ef list too when ran
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,168
    Likes Received:
    370
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice