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

@@ -23,6 +23,7 @@
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import sys
import textwrap
from llnl.util.tty.color import *
debug = False
@@ -39,7 +40,10 @@ def info(message, *args, **kwargs):
format = kwargs.get('format', '*b')
cprint("@%s{==>} %s" % (format, cescape(str(message))))
for arg in args:
print indent + str(arg)
lines = textwrap.wrap(
str(arg), initial_indent=indent, subsequent_indent=indent)
for line in lines:
print line
def verbose(message, *args):