From 4d250095cba36b32ce3e5083d453525209eeee06 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sat, 22 Dec 2012 18:26:15 -0600 Subject: fix external viewer using shlex This makes spawn_external_viewer not crash when $EDITOR or $PAGER have spaces or multiple arguments. In addition, spawn_external_viewer now chmods the file to read-only to remind users who use only an $EDITOR that this function does not read the file when the user returns. Also, some of the redundant exception case handling for editing has been consolidated. fixes #79 --- libmproxy/console/flowview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmproxy/console/flowview.py') diff --git a/libmproxy/console/flowview.py b/libmproxy/console/flowview.py index 3473c474..4215f170 100644 --- a/libmproxy/console/flowview.py +++ b/libmproxy/console/flowview.py @@ -343,7 +343,7 @@ class FlowView(common.WWrap): self.flow.backup() if part == "r": c = self.master.spawn_editor(conn.content or "") - conn.content = c.rstrip("\n") + conn.content = c.rstrip("\n") # what? elif part == "f": if not conn.get_form_urlencoded() and conn.content: self.master.prompt_onekey( -- cgit v1.2.3