From 1adbd730e54e17845e3f41b03d774f1a1d9b8255 Mon Sep 17 00:00:00 2001 From: Greg Price Date: Thu, 29 Oct 2009 01:36:40 -0400 Subject: [PATCH] tighten a bit of code svn path=/package_branches/invirt-web/cherrypy-rebased/; revision=2705 --- code/main.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/main.py b/code/main.py index a2ab887..786a087 100755 --- a/code/main.py +++ b/code/main.py @@ -97,14 +97,12 @@ class InvirtWeb(View): def handle_error(self): err = sys.exc_info()[1] if isinstance(err, InvalidInput): - e = revertStandardError() cherrypy.request.params['err'] = err - cherrypy.request.params['emsg'] = e + cherrypy.request.params['emsg'] = revertStandardError() raise cherrypy.InternalRedirect('/invalidInput') if not cherrypy.request.prev or 'err' not in cherrypy.request.prev.params: - e = revertStandardError() cherrypy.request.params['err'] = err - cherrypy.request.params['emsg'] = e + cherrypy.request.params['emsg'] = revertStandardError() cherrypy.request.params['traceback'] = _cperror.format_exc() raise cherrypy.InternalRedirect('/error') # fall back to cherrypy default error page -- 1.7.9.5