added list of undefined variable to exception that is raised in this case (python2.6 compatible)