[chirp_devel] [PATCH 4/6] Make download/upload progress optional (#2343)
Zachary T Welch
Wed Mar 4 23:19:11 PST 2015
From: Zach Welch <zach at mandolincreekfarm.com>
# HG changeset patch
# User Zach Welch <zach at mandolincreekfarm.com>
# Fake Node ID 404b50668252b9130530e9049ab132165b0c7206
Make download/upload progress optional (#2343)
This patch prevents the progress bar from appearing on the console if
the user gives the --quiet option. It also changes its destination to
stdout rather than stderr.
diff --git a/chirp/chirp_common.py b/chirp/chirp_common.py
index 0a34adc..61cd7a0 100644
--- a/chirp/chirp_common.py
+++ b/chirp/chirp_common.py
@@ -654,9 +654,12 @@ class MTOBankModel(BankModel):
def console_status(status):
"""Write a status object to the console"""
+ import logging
+ from chirp import logger
+ if not logger.is_visible(logging.WARN):
+ return
import sys
-
- sys.stderr.write("\r%s" % status)
+ sys.stdout.write("\r%s" % status)
class RadioPrompts:
More information about the chirp_devel
mailing list