Fixing flake8
This commit is contained in:
parent
30fcd4f77a
commit
2226de139b
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue