def _tolerateErrors(wrapped):
 def infoCallback(connection, where, ret):
  try:
   return wrapped(connection, where, ret)
  except:
   f = Failure()
   log.err(f, 'Error during info_callback')
   connection.get_app_data().failVerification(f)
 return infoCallback

def _tolerateErrors ( wrapped ) : def infoCallback ( connection , where , ret ) : try : return wrapped ( connection , where , ret ) except : f = Failure ( ) log . err ( f , 'Error during info_callback' ) connection . get_app_data ( ) . failVerification ( f ) return infoCallback
wrap up an c{info_callback} for pyopenssl so that if something goes wrong the error is immediately logged and the connection is dropped if possible .