def _getLastMessageFormated(acc):
 m = _getLastMessage(acc)
 if (m is None):
  return 'None'
 t = datetime.datetime.fromtimestamp(m[0]).strftime('%Y-%m-%d %H:%M')
 return u'{}: {}'.format(t, m[1])

def _getLastMessageFormated ( acc ) : m = _getLastMessage ( acc ) if ( m is None ) : return 'None' t = datetime . datetime . fromtimestamp ( m [ 0 ] ) . strftime ( '%Y-%m-%d %H:%M' ) return u'{}: {}' . format ( t , m [ 1 ] )
returns the last message as a formated string .