Make it clearer when we fall back to Raw.

This commit is contained in:
Aldo Cortesi 2012-04-02 11:22:01 +12:00
parent 42d06a05c0
commit f13e2213ea
1 changed files with 5 additions and 2 deletions

View File

@ -113,7 +113,7 @@ def view_hex(hdrs, content):
("text", s),
]))
trailer(len(content), txt)
return "HEX", txt
return "Hex", txt
def view_xmlish(hdrs, content):
@ -272,6 +272,9 @@ def get_content_view(viewmode, hdrItems, content):
func = get_view_func(viewmode, hdrs, content)
ret = func(hdrs, content)
if not ret:
viewmode = VIEW_RAW
ret = view_raw(hdrs, content)
msg.append(ret[0])
msg.append("Fallback to Raw")
else:
msg.append(ret[0])
return " ".join(msg), ret[1]