Fixing flake8

This commit is contained in:
Dave Hall 2017-11-27 08:54:17 +00:00
parent 30fcd4f77a
commit 2226de139b
3 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ import string
try:
from unittest import skipUnless
except:
except ImportError:
from django.utils.unittest import skipUnless
from django.test import TestCase
@ -186,7 +186,7 @@ class InternalsTest(SearchTestBase):
self.test11.title = "fooo"
self.test11.save()
raise Exception("Foo")
except:
except Exception:
pass
# Test a search that should get not model.
self.assertEqual(watson.search("fooo").count(), 0)

View File

@ -6,7 +6,7 @@ from django.core.exceptions import ImproperlyConfigured
try:
from django.utils.deprecation import MiddlewareMixin
cls = MiddlewareMixin
except:
except ImportError:
cls = object
from watson.search import search_context_manager

View File

@ -320,7 +320,7 @@ class SearchContext(object):
exception = False
try:
return func(*args, **kwargs)
except:
except Exception:
exception = True
if not self.__exit__(*sys.exc_info()):
raise