From 3847689257fd118ccf39fa4dd527e11fa3dbc031 Mon Sep 17 00:00:00 2001 From: Sunpy Date: Wed, 13 Mar 2019 11:01:54 +0100 Subject: [PATCH] Fail rank if no score data --- osuRepy/replay.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/osuRepy/replay.py b/osuRepy/replay.py index ccff528..ec87117 100644 --- a/osuRepy/replay.py +++ b/osuRepy/replay.py @@ -176,10 +176,11 @@ class Replay: def get_possible_hits(self): return self.get_hits() + self._score_miss.value - def get_rank(self): # We dont give out F ranks around here + def get_rank(self): hits = self.get_possible_hits() if hits == 0: - raise Exception("Can not calculate rank without any score data") + print("Can not calculate rank without any score data (Defaulting to Fail)") + return osuRanks.F r300 = self._score_300s.value / hits r50 = self._score_50s.value / hits