]> jfr.im git - erebus.git/commitdiff
clean up trivia
authorzonidjan <redacted>
Wed, 7 Jun 2017 18:38:51 +0000 (13:38 -0500)
committerzonidjan <redacted>
Wed, 7 Jun 2017 18:38:51 +0000 (13:38 -0500)
modules/trivia.py

index b9cd9f86eed95be27d8558dad20a4fa8251fb74b..61997905b36fb1e663411dc5e5a2d2db3a2ba786 100644 (file)
@@ -186,6 +186,7 @@ class TriviaState(object):
                        try: return str(self.db['users'][self.db['ranks'][num]]['points'])
                        except: return 0
 
+               status = False
                try:
                        f = open(self.db['hofpath'], 'rb+')
                        for i in range(self.db['hoflines']): #skip this many lines
@@ -205,12 +206,12 @@ class TriviaState(object):
                                'thirdscore': pts(2),
                        })
                        f.write(fcontents)
-                       return True
+                       status = True
                except Exception as e:
-                       raise e #FIXME wtf???
-                       return False
+                       status = False
                finally:
                        f.close()
+                       return status
 
        def endPointVote(self):
                self.getchan().msg("Voting has ended!")