Added a mechanism by which we can more reliable check real vs dummy Brother items
This commit is contained in:
parent
9d5cac2941
commit
9b696ddbc4
|
|
@ -13,7 +13,7 @@ from slackclient import SlackClient
|
||||||
import slack_util
|
import slack_util
|
||||||
|
|
||||||
# Use this if we can't figure out who a brother actually is
|
# Use this if we can't figure out who a brother actually is
|
||||||
MISSINGBRO_SCROLL = 0
|
MISSINGBRO_SCROLL = -1
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
|
@ -24,6 +24,9 @@ class Brother(object):
|
||||||
name: str
|
name: str
|
||||||
scroll: int
|
scroll: int
|
||||||
|
|
||||||
|
def is_valid(self):
|
||||||
|
return self.scroll is not MISSINGBRO_SCROLL
|
||||||
|
|
||||||
|
|
||||||
# load the family tree
|
# load the family tree
|
||||||
familyfile = open("sortedfamilytree.txt", 'r')
|
familyfile = open("sortedfamilytree.txt", 'r')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue