Skip to content

Commit adfb779

Browse files
committed
Fix #2402
1 parent f0cf1c7 commit adfb779

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Features
77
Bugfixes
88
--------
99

10+
* Avoid infinite loop if bootstrap3 can't be loaded (Issue #2402)
11+
1012
New in v7.7.11
1113
==============
1214

nikola/nikola.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,9 +1110,11 @@ def _get_themes(self):
11101110
try:
11111111
self._THEMES = utils.get_theme_chain(self.config['THEME'])
11121112
except Exception:
1113-
utils.LOGGER.warn('''Cannot load theme "{0}", using 'bootstrap3' instead.'''.format(self.config['THEME']))
1114-
self.config['THEME'] = 'bootstrap3'
1115-
return self._get_themes()
1113+
if self.config['THEME'] != 'bootstrap3':
1114+
utils.LOGGER.warn('''Cannot load theme "{0}", using 'bootstrap3' instead.'''.format(self.config['THEME']))
1115+
self.config['THEME'] = 'bootstrap3'
1116+
return self._get_themes()
1117+
raise
11161118
# Check consistency of USE_CDN and the current THEME (Issue #386)
11171119
if self.config['USE_CDN'] and self.config['USE_CDN_WARNING']:
11181120
bootstrap_path = utils.get_asset_path(os.path.join(

0 commit comments

Comments
 (0)