mirror of
https://github.com/django/django.git
synced 2025-11-07 07:15:35 +00:00
Removed many uses of bare "except:", which were either going to a) silence real issues, or b) were impossible to hit.
This commit is contained in:
2
django/core/cache/backends/memcached.py
vendored
2
django/core/cache/backends/memcached.py
vendored
@@ -141,7 +141,7 @@ class CacheClass(BaseMemcachedCache):
|
||||
)
|
||||
try:
|
||||
import memcache
|
||||
except:
|
||||
except ImportError:
|
||||
raise InvalidCacheBackendError(
|
||||
"Memcached cache backend requires either the 'memcache' or 'cmemcache' library"
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ class EmailBackend(BaseEmailBackend):
|
||||
stream_created = self.open()
|
||||
for message in email_messages:
|
||||
self.stream.write('%s\n' % message.message().as_string())
|
||||
self.stream.write('-'*79)
|
||||
self.stream.write('-' * 79)
|
||||
self.stream.write('\n')
|
||||
self.stream.flush() # flush after each message
|
||||
if stream_created:
|
||||
|
||||
Reference in New Issue
Block a user