Skip to content

Commit

Permalink
Fix #2402
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jul 25, 2016
1 parent f0cf1c7 commit adfb779
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGES.txt
Expand Up @@ -7,6 +7,8 @@ Features
Bugfixes
--------

* Avoid infinite loop if bootstrap3 can't be loaded (Issue #2402)

New in v7.7.11
==============

Expand Down
8 changes: 5 additions & 3 deletions nikola/nikola.py
Expand Up @@ -1110,9 +1110,11 @@ def _get_themes(self):
try:
self._THEMES = utils.get_theme_chain(self.config['THEME'])
except Exception:
utils.LOGGER.warn('''Cannot load theme "{0}", using 'bootstrap3' instead.'''.format(self.config['THEME']))
self.config['THEME'] = 'bootstrap3'
return self._get_themes()
if self.config['THEME'] != 'bootstrap3':
utils.LOGGER.warn('''Cannot load theme "{0}", using 'bootstrap3' instead.'''.format(self.config['THEME']))
self.config['THEME'] = 'bootstrap3'
return self._get_themes()
raise
# Check consistency of USE_CDN and the current THEME (Issue #386)
if self.config['USE_CDN'] and self.config['USE_CDN_WARNING']:
bootstrap_path = utils.get_asset_path(os.path.join(
Expand Down

0 comments on commit adfb779

Please sign in to comment.