

def _read_leaderboard(self):
    self._set_path()
    with self.lock:
        self.user_scores = {
            
        }
        self.scores = []
        self.aggregate_score = 0
        unicode_path = unicode(self.path)
        if path_exists(unicode_path):
            try:
                try:
                    f = open(unicode_path, 'r')
                    file_leaderboard = yaml.load(f)
                    if file_leaderboard:
                        for s in file_leaderboard:
                            self._add_score(UserScore(s['user'], s['score'], s['time']))
                finally:
                    f.close()
            except (IOError, KeyError, yaml.YAMLError) as e:
                LOG.error('Failed loading leaderboards file "%s": %s', e.path, str(e))
                raise LeaderboardError(('Failed loading leaderboard file "%s": %s' % (self.path, str(e))))
        else:
            self.user_scores = {
                
            }
            self.scores = []
        for s in self.default_scores:
            username = s.user
            if (username not in self.user_scores):
                self._add_score(s.copy())
        self._sort_scores()

dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/models/apiv1/leaderboards.py Leaderboard._read_leaderboard/VarMisuse@159/226 `self`->`e`