
from twisted.web.error import Error

_WHALE_FMT = """\
   __{lines}___
|\\/ {spaces}  X \\
}}    {msg}    >
|/\\_{lines}___-/
"""

def fail(error):
    if isinstance(error, Error):
        msg = "{0.status}: {0.message}".format(error)
    else:
        msg = repr(error)

    return _WHALE_FMT.format(
            spaces=" "*len(msg),
            lines="_"*len(msg),
            msg=msg)



@@ -119,17 +119,16 @@
 es%7D___-/
-%0A
 %22%22%22%0A%0Adef

Remove trailing line from whale