X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/a5aac31f655f0372f64bc459bf979813a41b0295..1adbd730e54e17845e3f41b03d774f1a1d9b8255:/code/main.py 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