Skip to content
Permalink
Browse files

Handle plugin install failures better

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 8, 2017
1 parent 7207adc commit c2da98ccb4d84ef16861d3c17271cff1d4bae799
Showing with 5 additions and 2 deletions.
  1. +5 −2 nikola/plugins/command/plugin.py
@@ -286,11 +286,14 @@ def do_install(self, url, name, show_install_notes=True):
if os.path.exists(req_plug_path):
LOGGER.notice('This plugin requires other Nikola plugins.')
LOGGER.info('Installing plugins...')
plugin_failure = False
try:
with io.open(req_plug_path, 'r', encoding='utf-8') as inf:
for plugname in inf.readlines():
self.do_install(url, plugname, show_install_notes)
except subprocess.CalledProcessError:
plugin_failure = self.do_install(url, plugname, show_install_notes) != 0
except Exception:
plugin_failure = True
if plugin_failure:
LOGGER.error('Could not install a plugin.')
print('Contents of the requirements-plugins.txt file:\n')
with io.open(req_plug_path, 'r', encoding='utf-8') as fh:

0 comments on commit c2da98c

Please sign in to comment.
You can’t perform that action at this time.