1
0
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:
Alex Gaynor
2012-09-07 15:06:23 -04:00
parent 257c4011cb
commit 335a9f9cf1
10 changed files with 31 additions and 48 deletions

View File

@@ -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"
)

View File

@@ -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: