File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -340,7 +340,11 @@ def bar_update_hook():
340340 stats_end = _Widget (stats_end , config .stats_end , '({rate})' if stats .f [:- 1 ] else '' )
341341
342342 def get_receipt ():
343- return _get_receipt (alive_repr )
343+ buffer = io .StringIO ()
344+ tbuf = terminal .get_term (buffer , True , 1000 ) # large enough to not truncate.
345+ run .last_len = 0 # prevents the inclusion of the clear end line escape sequence.
346+ alive_repr (tbuf )
347+ return buffer .getvalue ().strip ()
344348
345349 bar_handle = __AliveBarHandle (pause_monitoring , set_title , set_text ,
346350 current , lambda : run .monitor_text , lambda : run .rate_text ,
@@ -377,13 +381,6 @@ def get_receipt():
377381 term .flush ()
378382
379383
380- def _get_receipt (alive_repr ):
381- buffer = io .StringIO ()
382- tbuf = terminal .get_term (buffer , True , 1000 ) # large enough to not truncate.
383- alive_repr (tbuf )
384- return buffer .getvalue ().strip ()
385-
386-
387384class _Widget : # pragma: no cover
388385 def __init__ (self , func , value , default ):
389386 self .func = func
You can’t perform that action at this time.
0 commit comments