From 9b696ddbc42969ef00b5a405d69ee567ecce2da5 Mon Sep 17 00:00:00 2001 From: Jacob Henry Date: Tue, 20 Nov 2018 17:05:56 -0500 Subject: [PATCH] Added a mechanism by which we can more reliable check real vs dummy Brother items --- scroll_util.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scroll_util.py b/scroll_util.py index 1fbaadc..87d146e 100644 --- a/scroll_util.py +++ b/scroll_util.py @@ -13,7 +13,7 @@ from slackclient import SlackClient import slack_util # Use this if we can't figure out who a brother actually is -MISSINGBRO_SCROLL = 0 +MISSINGBRO_SCROLL = -1 @dataclass @@ -24,6 +24,9 @@ class Brother(object): name: str scroll: int + def is_valid(self): + return self.scroll is not MISSINGBRO_SCROLL + # load the family tree familyfile = open("sortedfamilytree.txt", 'r')