Merge pull request #74 from kanzure/editexception

Show an error when $EDITOR/$PAGER are unset.
This commit is contained in:
Aldo Cortesi 2012-12-05 14:32:14 -08:00
commit 9f0db83c48

View File

@ -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,