def bare_error(extrabody=None):
 body = 'Unrecoverable error in the server.'
 if (extrabody is not None):
  if (not isinstance(extrabody, str)):
   extrabody = extrabody.encode('utf-8')
  body += ('\n' + extrabody)
 return ('500 Internal Server Error', [('Content-Type', 'text/plain'), ('Content-Length', str(len(body)))], [body])

def bare_error ( extrabody = None ) : body = 'Unrecoverable error in the server.' if ( extrabody is not None ) : if ( not isinstance ( extrabody , str ) ) : extrabody = extrabody . encode ( 'utf-8' ) body += ( '\n' + extrabody ) return ( '500 Internal Server Error' , [ ( 'Content-Type' , 'text/plain' ) , ( 'Content-Length' , str ( len ( body ) ) ) ] , [ body ] )
produce status .