[chirp_devel] [PATCH 01/10] Add newline at end of console status (#2343)
Zach Welch
Tue Mar 10 18:49:36 PDT 2015
Dan,
I just noticed that you did not commit this patch. As apparently it was
not clear, I did change it per your initial feedback. The logic to add
the newline has been moved out of the Status stringification routine and
into console_status.
On 03/06/2015 01:15 AM, Zachary T Welch wrote:
> # HG changeset patch
> # User Zachary T Welch <zach at mandolincreekfarm.com>
> # Fake Node ID 31b8fc9d4465045b03a54f061b3cfb7906eb4c9a
>
> Add newline at end of console status (#2343)
>
> When downloading/uploading on the console, a pretty status bar is
> printed on a single line. At the end of the transfer, a newline needs
> to be added, or subsequent output will appear on the same line as the
> status bar.
>
> diff --git a/chirp/chirp_common.py b/chirp/chirp_common.py
> index 725612b..b42859a 100644
> --- a/chirp/chirp_common.py
> +++ b/chirp/chirp_common.py
> @@ -659,7 +659,10 @@ def console_status(status):
> if not logger.is_visible(logging.WARN):
> return
> import sys
> + import os
> sys.stdout.write("\r%s" % status)
> + if status.cur == status.max:
> + sys.stdout.write(os.linesep)
>
>
> class RadioPrompts:
>
--
Zach Welch
Mandolin Creek Farm
www.mandolincreekfarm.com
farm: 541-453-4131
cell: 541-740-3410
More information about the chirp_devel
mailing list