Skip to content

Commit

Permalink
Merge pull request #23 from matthiask/master
Browse files Browse the repository at this point in the history
Less warnings
  • Loading branch information
owais committed Oct 29, 2015
2 parents 4698f09 + 6a15a43 commit e3e26ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/app/tests/test_webpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_simple_and_css_extract(self):

chunks = assets['chunks']
self.assertIn('main', chunks)
self.assertEquals(len(chunks), 1)
self.assertEqual(len(chunks), 1)

main = chunks['main']
self.assertEqual(main[0]['path'], os.path.join(settings.BASE_DIR, 'assets/bundles/main.js'))
Expand Down
3 changes: 2 additions & 1 deletion webpack_loader/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def get_config(config_name):

def get_assets(config):
try:
return json.loads(open(config['STATS_FILE']).read())
with open(config['STATS_FILE']) as f:
return json.load(f)
except IOError:
raise IOError(
'Error reading {}. Are you sure webpack has generated the file '
Expand Down

0 comments on commit e3e26ad

Please sign in to comment.