Try using a try/except to get it working.
try:
cherrypy.response.simpleCookie['name']['expires']=0
turbogears.flash("you are login out!")
raise cherrypy.HTTPRedirect(turbogears.url("/loginclass/index"))
except KeyError:
turbogears.flash("you are not login!")
raise cherrypy.HTTPRedirect(turbogears.url("/loginclass/index"))
This will prevent your app from giving you a 500 error, but I'm not
sure if it will solve the issue of the phantom key. Your previous
code is correct but for some odd reason the 'name' key in your
simpleCookie is dissapearing between the time you test .has_key and
when you try to access it.
Lee
--
Lee McFadden
blog: http://www.splee.co.uk
work: http://fireflisystems.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---