<div dir="ltr"><div class="gmail_quote"><br># HG changeset patch<br>
# User Christopher Hoover <<a href="mailto:ch@murgatroid.com">ch@murgatroid.com</a>><br>
# Date 1510452023 28800<br>
# Sat Nov 11 18:00:23 2017 -0800<br>
# Node ID 554ce6091c6ddeeafac4a832cdd56f<wbr>7a4041f679<br>
# Parent 0e0470d3e892bfd4818bfb972b8b85<wbr>d58f2b00d4<br>
Remove "naked" logging of exceptions.<br>
<br>
Changes all instances of log.error(e) where e is a caught exception to<br>
provide context in the log, so as to make it trival to track down<br>
problems (such as split(None) in memedit).<br>
<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/detect.py<br>
--- a/chirp/detect.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/detect.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -43,7 +43,7 @@<br>
md = icf.get_model_data(ser)<br>
return _icom_model_data_to_rclass(md)<br>
except errors.RadioError, e:<br>
- LOG.error(e)<br>
+ LOG.error("_detect_icom_radio: %s", e)<br>
<br>
# ICOM IC-91/92 Live-mode radios @ 4800/38400 baud<br>
<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/ft1d.py<br>
--- a/chirp/drivers/ft1d.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/ft1d.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -1844,7 +1844,7 @@<br>
try:<br>
element.run_apply_callback()<br>
except NotImplementedError as e:<br>
- LOG.error(e)<br>
+ LOG.error("ft1d.set_settings: %s", e)<br>
continue<br>
<br>
# Find the object containing setting.<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/kenwood_hmk.py<br>
--- a/chirp/drivers/kenwood_hmk.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/kenwood_hmk.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -125,7 +125,7 @@<br>
<br>
if not good:<br>
for e in errors:<br>
- LOG.error(e)<br>
+ LOG.error("kenwood_hmk: %s", e)<br>
raise errors.InvalidDataError("No channels found")<br>
<br>
@classmethod<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/kenwood_itm.py<br>
--- a/chirp/drivers/kenwood_itm.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/kenwood_itm.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -129,7 +129,7 @@<br>
<br>
if not good:<br>
for e in errors:<br>
- LOG.error(e)<br>
+ LOG.error("kenwood_itm: %s", e)<br>
raise errors.InvalidDataError("No channels found")<br>
<br>
@classmethod<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/rfinder.py<br>
--- a/chirp/drivers/rfinder.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/rfinder.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -262,7 +262,7 @@<br>
import traceback<br>
LOG.error(traceback.format_<wbr>exc())<br>
LOG.error("Error in received data, cannot continue")<br>
- LOG.error(e)<br>
+ LOG.error("rfinder.parse_data: %s", e)<br>
LOG.error(self.__cheat)<br>
LOG.error(line)<br>
<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/thd72.py<br>
--- a/chirp/drivers/thd72.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/thd72.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -558,7 +558,7 @@<br>
try:<br>
element.run_apply_callback()<br>
except NotImplementedError as e:<br>
- LOG.error(e)<br>
+ LOG.error("thd72: %s", e)<br>
continue<br>
<br>
# Find the object containing setting.<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/uv5r.py<br>
--- a/chirp/drivers/uv5r.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/uv5r.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -514,7 +514,7 @@<br>
data = _do_ident(radio, magic)<br>
return data<br>
except errors.RadioError, e:<br>
- LOG.error(e)<br>
+ LOG.error("uv5r._ident_radio: %s", e)<br>
error = e<br>
time.sleep(2)<br>
<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/drivers/vx8.py<br>
--- a/chirp/drivers/vx8.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/drivers/vx8.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -1398,7 +1398,7 @@<br>
try:<br>
element.run_apply_callback()<br>
except NotImplementedError as e:<br>
- LOG.error(e)<br>
+ LOG.error("vx8.set_settings: %s", e)<br>
continue<br>
<br>
# Find the object containing setting.<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/ui/importdialog.py<br>
--- a/chirp/ui/importdialog.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/ui/importdialog.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -266,7 +266,7 @@<br>
"name": name,<br>
"comment": comm})<br>
except import_logic.ImportError, e:<br>
- LOG.error(e)<br>
+ LOG.error("Import error: %s", e)<br>
error_messages[new] = str(e)<br>
continue<br>
<br>
diff -r 0e0470d3e892 -r 554ce6091c6d chirp/ui/memedit.py<br>
--- a/chirp/ui/memedit.py Fri Nov 03 20:24:29 2017 -0400<br>
+++ b/chirp/ui/memedit.py Sat Nov 11 18:00:23 2017 -0800<br>
@@ -179,7 +179,7 @@<br>
try:<br>
new = chirp_common.parse_freq(new)<br>
except ValueError, e:<br>
- LOG.error(e)<br>
+ LOG.error("chirp_common.parse_<wbr>freq error: %s", e)<br>
new = None<br>
<br>
if not self._features.has_nostep_<wbr>tuning:<br>
@@ -969,7 +969,7 @@<br>
if i not in default_col_order:<br>
raise Exception()<br>
except Exception, e:<br>
- LOG.error(e)<br>
+ LOG.error("column order setting: %s", e)<br>
col_order = default_col_order<br>
<br>
non_editable = [_("Loc")]<br>
</div><br></div>