Make SSL verification failures recommend spack -k

- Adds optional long message to SpackError
- tty now wraps long message text.
This commit is contained in:
Todd Gamblin
2014-04-13 16:38:15 -07:00
parent 980c1f0e47
commit 59a3b8dc67
5 changed files with 33 additions and 14 deletions

View File

@@ -96,8 +96,10 @@ except SpackError, e:
if spack.debug:
# In debug mode, raise with a full stack trace.
raise
elif e.long_message:
tty.die(e.message, e.long_message)
else:
# Otherwise print a nice simple message.
tty.die(e.message)
except KeyboardInterrupt:
tty.die("Got a keyboard interrupt from the user.")