diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py index 1d1d1e7b1..3473c474b 100644 --- a/libmproxy/console/flowview.py +++ b/libmproxy/console/flowview.py @@ -542,7 +542,10 @@ class FlowView(common.WWrap): if conn and conn.content: t = conn.headers["content-type"] or [None] t = t[0] - self.master.spawn_external_viewer(conn.content, t) + if os.environ.has_key("EDITOR") or os.environ.has_key("PAGER"): + self.master.spawn_external_viewer(conn.content, t) + else: + self.master.statusbar.message("Error! Set $EDITOR or $PAGER.") elif key == "|": self.master.path_prompt( "Send flow to script: ", self.state.last_script,