Skip to content

Commit

Permalink
Merge pull request #93 from zzZIMAWAKE/hubspot-exceptions-evaluate-to…
Browse files Browse the repository at this point in the history
…-false

Remove overriding default bool evaluation of exceptions
  • Loading branch information
jpetrucciani committed Mar 11, 2020
2 parents 6c10c85 + 79dc923 commit 9133ce2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions hubspot3/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ def __init__(self):
self.msg = ""
self.reason = ""

def __bool__(self):
return False


class HubspotError(ValueError):
"""Any problems get thrown as HubspotError exceptions with the relevant info inside"""
Expand Down Expand Up @@ -58,9 +55,6 @@ def __contains__(self, item):
"""tests if the given item text is in the error text"""
return item in self.__str__()

def __bool__(self):
return False

def __init__(self, result, request, err=None):
super(HubspotError, self).__init__(result and result.reason or "Unknown Reason")
if result is None:
Expand Down

0 comments on commit 9133ce2

Please sign in to comment.