[chirp_devel] [PATCH 4/4] Suppress startup debugging messages (#2343)
Zach Welch
Sun Feb 22 23:09:55 PST 2015
This patch changes the verbose startup messages to use dprint.
This change is required to make the CLI remotely usable, as it's
unreasonable to print so much information in that context.
I kept this separate from the last patch, because I can imagine that
this might impact the automated/buildbot testing.
---
chirp/directory.py | 6 +++---
chirpui/mainapp.py | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/chirp/directory.py b/chirp/directory.py
index 5fc47e3..728438d 100644
--- a/chirp/directory.py
+++ b/chirp/directory.py
@@ -18,7 +18,7 @@ import os
import tempfile
from chirp import icf
-from chirp import chirp_common, util, rfinder, radioreference, errors
+from chirp import chirp_common, util, rfinder, radioreference, errors, dprint
def radio_class_id(cls):
"""Return a unique identification string for @cls"""
@@ -47,12 +47,12 @@ def register(cls):
ident = radio_class_id(cls)
if ident in DRV_TO_RADIO.keys():
if ALLOW_DUPS:
- print "Replacing existing driver id `%s'" % ident
+ dprint("Replacing existing driver id `%s'" % ident)
else:
raise Exception("Duplicate radio driver id `%s'" % ident)
DRV_TO_RADIO[ident] = cls
RADIO_TO_DRV[cls] = ident
- print "Registered %s = %s" % (ident, cls.__name__)
+ dprint("Registered %s = %s" % (ident, cls.__name__))
return cls
diff --git a/chirpui/mainapp.py b/chirpui/mainapp.py
index 79f6815..71549fa 100644
--- a/chirpui/mainapp.py
+++ b/chirpui/mainapp.py
@@ -36,7 +36,7 @@ try:
except ImportError,e:
common.log_exception()
common.show_error("\nThe Pyserial module is not installed!")
-from chirp import platform, generic_xml, generic_csv, directory, util
+from chirp import platform, generic_xml, generic_csv, directory, util, dprint
from chirp import ic9x, kenwood_live, idrp, vx7, vx5, vx6
from chirp import CHIRP_VERSION, chirp_common, detect, errors
from chirp import icf, ic9x_icf
@@ -526,7 +526,7 @@ If you think that it is valid, you can select a radio model below to force an op
files = glob(os.path.join(basepath, "*.csv"))
for fn in files:
if os.path.exists(os.path.join(stock_dir, os.path.basename(fn))):
- print "Skipping existing stock config"
+ dprint("Skipping existing stock config")
continue
try:
shutil.copy(fn, stock_dir)
--
1.9.1
More information about the chirp_devel
mailing list