From 9e9517dce1d9badecfe1827ce5c0bb9f1e4d2d03 Mon Sep 17 00:00:00 2001 From: Ryan Huber Date: Mon, 3 Aug 2015 06:48:27 -0700 Subject: wrap in a try --- wee_slack.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wee_slack.py b/wee_slack.py index df5b35e..26896ca 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -721,9 +721,12 @@ class User(object): return self.name def __eq__(self, compare_str): - if compare_str == self.name or compare_str == "@" + self.name or compare_str == self.identifier: - return True - else: + try: + if compare_str == self.name or compare_str == "@" + self.name or compare_str == self.identifier: + return True + else: + return False + except: return False def get_aliases(self): -- cgit