Reduce occurrences of bare exceptions

* replace bare exceptions with specific ones, if possible
* use "exc" instead of "e" as exception variable
  ("exc" is the most popular choice in the standard library)
This commit is contained in:
Lars Kruse
2018-07-27 04:11:51 +02:00
parent a06b61b054
commit b07f413034
4 changed files with 39 additions and 35 deletions

View File

@@ -107,7 +107,7 @@ DEFAULT_FROM_EMAIL = 'ivatar@mg.linux-kernel.at'
try:
from ivatar.settings import DATABASES
except Exception: # pragma: no cover
except ImportError: # pragma: no cover
DATABASES = [] # pragma: no cover
if 'default' not in DATABASES: