Skip to content

Commit

Permalink
Complete refactor of get_scores() / load_scores()
Browse files Browse the repository at this point in the history
Eliminates TODO left in ef1f327. Reference #19.
  • Loading branch information
dgw committed Oct 19, 2015
1 parent 4f1b1a4 commit c8f7c0d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions unobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,10 +719,6 @@ def update_scores(self, bot, players, winner, score, time):
bot.say("Error saving UNO score file: %s" % e)

def get_scores(self, bot):
# @TODO refactor to get rid of redundant function
return self.load_scores(bot)

def load_scores(self, bot):
scores = {}
with lock:
try:
Expand All @@ -731,7 +727,7 @@ def load_scores(self, bot):
except ValueError:
try:
self.convert_score_file(bot)
return self.load_scores(bot)
return self.get_scores(bot)
except ValueError:
bot.say("Something has gone horribly wrong with the UNO scores. Please submit an issue on GitHub.")
except IOError, e:
Expand Down

0 comments on commit c8f7c0d

Please sign in to comment.