docstring do_export_thread closes #500
This commit is contained in:
parent
c74734545b
commit
f60e40fc9c
1 changed files with 9 additions and 4 deletions
|
|
@ -287,15 +287,20 @@ class Boobmsg(ReplApplication):
|
||||||
self.flush()
|
self.flush()
|
||||||
|
|
||||||
def do_export_thread(self, arg):
|
def do_export_thread(self, arg):
|
||||||
id, backend_name = self.parse_id(arg)
|
"""
|
||||||
cmd = self.do('get_thread', id, backends=backend_name)
|
export_thread
|
||||||
|
|
||||||
|
Export a thread
|
||||||
|
"""
|
||||||
|
_id, backend_name = self.parse_id(arg)
|
||||||
|
cmd = self.do('get_thread', _id, backends=backend_name)
|
||||||
if self.options.filename:
|
if self.options.filename:
|
||||||
output = self.options.filename
|
output = self.options.filename
|
||||||
else:
|
else:
|
||||||
output = sys.stdout
|
output = sys.stdout
|
||||||
for backend, thread in cmd:
|
for backend, thread in cmd:
|
||||||
for m in thread.iter_all_messages():
|
for msg in thread.iter_all_messages():
|
||||||
self.format(m, output=output)
|
self.format(msg, output=output)
|
||||||
|
|
||||||
|
|
||||||
def do_show(self, arg):
|
def do_show(self, arg):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue