Fix stickycookie setting, indented view traceback.

This commit is contained in:
Aldo Cortesi 2011-03-13 11:43:55 +13:00
parent 0042687f0d
commit 18d25ec1a1
3 changed files with 8 additions and 1 deletions

View File

@ -1256,7 +1256,11 @@ class ConsoleMaster(flow.FlowMaster):
) )
k = None k = None
elif k == "t": elif k == "t":
self.prompt("Sticky cookie: ", self.set_stickycookie) self.prompt(
"Sticky cookie: ",
self.stickycookie_txt,
self.set_stickycookie
)
k = None k = None
if k: if k:
self.view.keypress(size, k) self.view.keypress(size, k)

View File

@ -469,8 +469,10 @@ class FlowMaster(controller.Master):
if not flt: if not flt:
return "Invalid filter expression." return "Invalid filter expression."
self.stickycookie_state = StickyCookieState(flt) self.stickycookie_state = StickyCookieState(flt)
self.stickycookie_txt = txt
else: else:
self.stickycookie_state = None self.stickycookie_state = None
self.stickycookie_txt = None
def start_client_playback(self, flows, exit): def start_client_playback(self, flows, exit):
""" """

View File

@ -75,6 +75,7 @@ def pretty_xmlish(s):
A robust pretty-printer for XML-ish data. A robust pretty-printer for XML-ish data.
Returns a list of lines. Returns a list of lines.
""" """
s = cleanBin(s)
data, offset, indent, prev = [], 0, 0, None data, offset, indent, prev = [], 0, 0, None
for i in re.finditer(TAG, s, re.VERBOSE|re.MULTILINE): for i in re.finditer(TAG, s, re.VERBOSE|re.MULTILINE):
start, end = i.span() start, end = i.span()