mirror of
https://github.com/mitmproxy/mitmproxy.git
synced 2024-12-13 16:16:43 +00:00
Merge pull request #74 from kanzure/editexception
Show an error when $EDITOR/$PAGER are unset.
This commit is contained in:
commit
9f0db83c48
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user