Returns the occupation as was last recorded.

def get_occupation(self):
        """ Returns the occupation as was last recorded. """
        ret = {}
        self.l.info("Reading occupation from database...")
        with self.lock:
            for pc_name, pc_id in self.pc2id_lut.iteritems():
                self.c.execute(""" SELECT occupation FROM occupationUpdates
                                          WHERE pc=? ORDER BY datetime DESC
                                          LIMIT 0, 1 """, 
                                            (pc_id,))
                row = self.c.fetchone()
                if row is not None:
                    ret[pc_name] = row[0]
        self.l.info("  ... done: %s entries", len(ret))
        return ret