Skip to content

Commit

Permalink
Fail with a useful error if no shareabouts flavor is configured.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjumbewu committed Feb 27, 2015
1 parent e49155c commit a88bc18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@

try:
SHAREABOUTS
except NameError:
flavor = SHAREABOUTS['FLAVOR']
except (NameError, TypeError, KeyError):
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured('No SHAREABOUTS configuration defined. '
'Did you forget to copy the local settings template?')

here = os.path.abspath(os.path.dirname(__file__))
flavor = SHAREABOUTS.get('FLAVOR')
if 'CONFIG' not in SHAREABOUTS:
SHAREABOUTS['CONFIG'] = os.path.abspath(os.path.join(here, '..', 'flavors', flavor))
if 'PACKAGE' not in SHAREABOUTS:
Expand Down

0 comments on commit a88bc18

Please sign in to comment.