'Read the last checkpoint from the oplog progress dictionary.'

def read_last_checkpoint(self):

    oplog_str = str(self.oplog)
    ret_val = None
    with self.oplog_progress as oplog_prog:
        oplog_dict = oplog_prog.get_dict()
        try:
            ret_val = oplog_dict[self.replset_name]
        except KeyError:
            try:
                ret_val = oplog_dict[oplog_str]
            except KeyError:
                pass
    LOG.debug(('OplogThread:    reading    last    checkpoint    as    %s    ' % str(ret_val)))
    self.checkpoint = ret_val
    return ret_val
