def flasher(msg, severity=None):
 try:
  flash(msg, severity)
 except RuntimeError:
  if (severity == u'danger'):
   logging.error(msg)
  else:
   logging.info(msg)

def flasher ( msg , severity = None ) : try : flash ( msg , severity ) except RuntimeError : if ( severity == u'danger' ) : logging . error ( msg ) else : logging . info ( msg )
flasks flash if available .