Skip to content

Commit

Permalink
dont break if improperly configured
Browse files Browse the repository at this point in the history
  • Loading branch information
ymmn authored Sep 8, 2016
1 parent 91cb502 commit 8b6e559
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions webpack/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ def __init__(self, assets_file=None, *args, **kwargs):
# check if assets file present
if assets_file is None:
self.assets_file = settings.WEBPACK_ASSETS_FILE
self.check_assets()
self.load_json()

try:
self.check_assets()
self.load_json()
except ImproperlyConfigured:
self.assets = {}

super(WebpackDevServerStorage, self).__init__(*args, **kwargs)

def check_assets(self):
Expand Down Expand Up @@ -80,8 +85,13 @@ def __init__(self, assets_file=None, *args, **kwargs):
# check if assets file present
if assets_file is None:
self.assets_file = settings.WEBPACK_ASSETS_FILE
self.check_assets()
self.load_json()

try:
self.check_assets()
self.load_json()
except ImproperlyConfigured:
self.assets = {}

self.location = 'static'

bucket_name = settings.AWS_STORAGE_BUCKET_NAME
Expand Down

0 comments on commit 8b6e559

Please sign in to comment.