Merge pull request #46 from surik00/dev-1.x

Improve check in ExceptionsFilter
This commit is contained in:
Alex Root Junior 2018-06-07 23:47:20 +03:00 committed by GitHub
commit 239728ccc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -238,12 +238,7 @@ class ExceptionsFilter(Filter):
self.exception = exception
def check(self, dispatcher, update, exception):
try:
raise exception
except self.exception:
return True
except:
return False
return isinstance(exception, self.exception)
def generate_default_filters(dispatcher, *args, **kwargs):