Почему на вызов функции sysError я получаю - NameError: global name ‘sysError’ is not defined?
# -*- coding: utf-8 -*-
import web
web.config.debug = False
urls = (
'/', 'index'
)
app = web.application(urls, globals())
render = web.template.render('templates/')
pageTitle='COPPER initializing...'
class index:
def sysError(errMessage):
print errMessage
pageTitle = 'oops'
return pageTitle
def GET (self):
import index
try:
pageTitle = index.pageTitle()
except:
errMessage = "Can't retrieve configuration file. Please reinstall."
pageTitle = sysError(errMessage)
adminCheck = index.adminCheck()
return render.index(pageTitle)
if __name__ == "__main__":
app.run()