def _send_last_class_to_vk(self): last_class = self.cursor.execute('''SELECT class FROM {} WHERE timestamp={} ORDER BY id DESC LIMIT 1'''.format(table, self.last_timestamp)) phrase_to_send = generate_phrase(current_movement_class) self.vk_api.send_message(phrase_to_send)
def _send_last_class_to_vk(self): print self.last_timestamp last_class = self.cursor.execute(u'''SELECT class FROM {} WHERE timestamp={} ORDER BY id DESC LIMIT 1'''.format(self.table, self.last_timestamp)).fetchone()[0] phrase_to_send = generate_phrase(last_class) self.vk_api.send_message(phrase_to_send)