This commit is contained in:
Maximilian Hils 2017-12-12 13:14:25 +01:00
parent 472d122c12
commit 4d924dcfe2

View File

@ -329,9 +329,9 @@ class ConsoleAddon:
correct viewier, and fall back to the programs in $PAGER or $EDITOR correct viewier, and fall back to the programs in $PAGER or $EDITOR
if necessary. if necessary.
""" """
fpart = getattr(f, part) fpart = getattr(f, part, None)
if not fpart: if not fpart:
raise exceptions.CommandError("Could not view part %s." % part) raise exceptions.CommandError("Part must be either request or response, not %s." % part)
t = fpart.headers.get("content-type") t = fpart.headers.get("content-type")
content = fpart.get_content(strict=False) content = fpart.get_content(strict=False)
if not content: if not content: