Commit 0cee5f04 by Dennis Jen Committed by Daniel Friedman

Fixed unidiomatic-typecheck pylint error.

parent a232209e
...@@ -32,7 +32,7 @@ class BaseProcessErrorMiddleware(object): ...@@ -32,7 +32,7 @@ class BaseProcessErrorMiddleware(object):
pass pass
def process_exception(self, _request, exception): def process_exception(self, _request, exception):
if type(exception) is self.error: if isinstance(exception, self.error):
return JsonResponse({ return JsonResponse({
"error_code": self.error_code, "error_code": self.error_code,
"developer_message": str(exception) "developer_message": str(exception)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment