def make_cgitb_middleware(app, global_conf, display=NoDefault, logdir=None, context=5, format='html'):
 from paste.deploy.converters import asbool
 if (display is not NoDefault):
  display = asbool(display)
 if ('debug' in global_conf):
  global_conf['debug'] = asbool(global_conf['debug'])
 return CgitbMiddleware(app, global_conf=global_conf, display=display, logdir=logdir, context=context, format=format)

def make_cgitb_middleware ( app , global_conf , display = NoDefault , logdir = None , context = 5 , format = 'html' ) : from paste . deploy . converters import asbool if ( display is not NoDefault ) : display = asbool ( display ) if ( 'debug' in global_conf ) : global_conf [ 'debug' ] = asbool ( global_conf [ 'debug' ] ) return CgitbMiddleware ( app , global_conf = global_conf , display = display , logdir = logdir , context = context , format = format )
wraps the application in the cgitb error catcher .