def begin(self):
        history = []
        unlocked = {}
        if self.data_filename:
            try:
                data_file = open(self.data_filename, 'rb')
            except __HOLE__:
                log.debug("Failed to read achievement data from %s",
                          self.data_filename)
            else:
                data = AchievementData.load(data_file)
                data_file.close()
                log.info("Loaded achievement data from %s",
                         self.data_filename)
                history = data.pop('history', history)
                history.append(data)
                del history[:-10]
                unlocked = data.get('achievements.unlocked', unlocked)

        self.data.setdefault('history', history)
        self.data.setdefault('achievements.unlocked', unlocked)
        self.data.setdefault('achievements.new', [])
        self.data.setdefault('result.tests', [])
        self.data.setdefault('result.string', '')
        self.data.setdefault('result.errors', [])
        self.data.setdefault('result.failures', [])
        self.data.setdefault('time.start', datetime.now())
dataset/ETHPy150Open exogen/nose-achievements/noseachievements/plugin.py/AchievementsPlugin.begin