diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-08-03 06:48:27 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-08-03 06:48:27 -0700 |
commit | 9e9517dce1d9badecfe1827ce5c0bb9f1e4d2d03 (patch) | |
tree | de51ad139dc9770fa828062c111d2e197432e340 | |
parent | 6bb94b8b4b602fcc63066a5887576fe204503d39 (diff) | |
download | wee-slack-9e9517dce1d9badecfe1827ce5c0bb9f1e4d2d03.tar.gz |
wrap in a try
-rw-r--r-- | wee_slack.py | 9 |
1 files 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): |