
# HG changeset patch # User Zachary T Welch zach@mandolincreekfarm.com # Fake Node ID 5ff873af885be055cb879ad53186a3eb9f46dff0
Fix pylint issues in radioreference.py (#159)
diff --git a/chirp/radioreference.py b/chirp/radioreference.py index d52284e..8d4fc6c 100644 --- a/chirp/radioreference.py +++ b/chirp/radioreference.py @@ -13,6 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see http://www.gnu.org/licenses/.
+""" +Network driver for connecting with radioreference.com. +""" + import logging from chirp import chirp_common, errors
@@ -82,9 +86,9 @@ class RadioReferenceRadio(chirp_common.NetworkSourceRadio): status.max += len(county.agencyList)
for cat in county.cats: - LOG.debug("Fetching category:", cat.cName) + LOG.debug("Fetching category: %s", cat.cName) for subcat in cat.subcats: - LOG.debug("\t", subcat.scName) + LOG.debug("\t%s", subcat.scName) result = self._client.service.getSubcatFreqs(subcat.scid, self._auth) self._freqs += result @@ -96,9 +100,9 @@ class RadioReferenceRadio(chirp_common.NetworkSourceRadio): for cat in agency.cats: status.max += len(cat.subcats) for cat in agency.cats: - LOG.debug("Fetching category:", cat.cName) + LOG.debug("Fetching category: %s", cat.cName) for subcat in cat.subcats: - LOG.debug("\t", subcat.scName) + LOG.debug("\t%s", subcat.scName) result = self._client.service.getSubcatFreqs(subcat.scid, self._auth) self._freqs += result @@ -141,7 +145,7 @@ class RadioReferenceRadio(chirp_common.NetworkSourceRadio): else: try: tone, tmode = freq.tone.split(" ") - except Exception: + except ValueError: tone, tmode = None, None if tmode == "PL": mem.tmode = "TSQL" @@ -150,7 +154,7 @@ class RadioReferenceRadio(chirp_common.NetworkSourceRadio): mem.tmode = "DTCS" mem.dtcs = int(tone) else: - LOG.error("Error: unsupported tone: %s" % freq) + LOG.error("Error: unsupported tone: %s", freq) try: mem.mode = self._get_mode(freq.mode) except KeyError: diff --git a/tools/cpep8.lintful b/tools/cpep8.lintful index 49f08b2..15d6174 100644 --- a/tools/cpep8.lintful +++ b/tools/cpep8.lintful @@ -94,7 +94,6 @@ ./chirp/memmap.py ./chirp/platform.py ./chirp/pyPEG.py -./chirp/radioreference.py ./chirp/ui/bandplans.py ./chirp/ui/bankedit.py ./chirp/ui/clone.py