Updated pip uninstall message to not scare people + add a fail message.

This commit is contained in:
Joshua Harlow 2012-02-09 13:44:11 -08:00
parent 1be309853d
commit aee3a0de56
2 changed files with 8 additions and 2 deletions

View File

@ -60,11 +60,12 @@ def uninstall(pips, distro, skip_errors=True):
LOG.info("Uninstalling python packages (%s) using command (%s)" % (", ".join(pipnames), root_cmd)) LOG.info("Uninstalling python packages (%s) using command (%s)" % (", ".join(pipnames), root_cmd))
for name in pipnames: for name in pipnames:
try: try:
LOG.debug("Uninstall python package (%s)" % (name)) LOG.debug("Uninstalling python package (%s)" % (name))
cmd = [root_cmd, 'uninstall'] + PIP_UNINSTALL_CMD_OPTS + [str(name)] cmd = [root_cmd, 'uninstall'] + PIP_UNINSTALL_CMD_OPTS + [str(name)]
sh.execute(*cmd, run_as_root=True) sh.execute(*cmd, run_as_root=True)
except excp.ProcessExecutionError: except excp.ProcessExecutionError:
if skip_errors: if skip_errors:
LOG.warn("Ignoring execution error that occured when uninstalling pip %s!" % (name)) LOG.warn(("Ignoring execution error that occured when uninstalling pip %s!"
" (this may be ok if it was uninstalled by a previous component)") % (name))
else: else:
raise raise

View File

@ -500,6 +500,11 @@ def _goodbye_header(worked):
| National Cheese | | National Cheese |
\ Emporium / \ Emporium /
----------------- -----------------
''')
potential_fails.append(r'''
_______________________
< You have been borked. >
-----------------------
''') ''')
if not worked: if not worked:
msg = random.choice(potentials_fails).strip("\n\r") msg = random.choice(potentials_fails).strip("\n\r")