def get_status(self):
    cursor = self.connection.cursor()
    cursor.execute("select datetime(dt,'localtime') as dt, event,\n                            (strftime('%s','now') - strftime('%s',dt))/60 as\n                            elapsed_minutes from events order by dt desc limit 1")
    row = cursor.fetchone()
    status = {}
    if (row is not None):
        for key in row.keys():
            status[key.lower()] = row[key]
        cursor.close()
    return status
def get_status(self):
    cursor = self.connection.cursor()
    cursor.execute("select datetime(dt,'localtime') as dt, event,\n                            (strftime('%s','now') - strftime('%s',dt))/60 as\n                            elapsed_minutes from events order by dt desc limit 1")
    row = cursor.fetchone()
    status = {}
    if (row is not None):
        for key in row.keys():
            status[key.lower()] = row[key]
        cursor.close()
    return status