Remove some unnecessary calls to logging.error.

pull/61/head
Christian T. Jacobs 2017-05-17 17:36:33 +01:00
rodzic d5ff95edb1
commit 15f38b4c43
4 zmienionych plików z 24 dodań i 9 usunięć

Wyświetl plik

@ -221,9 +221,7 @@ class DXCluster:
# Handle empty host/port string (or the case where host/port are None).
if(not host):
message = "Unable to connect to a DX cluster because no hostname was specified."
logging.error(message)
error(parent=self.application.window, message=message)
error(parent=self.application.window, message="Unable to connect to a DX cluster because no hostname was specified.")
return
if(not port):
logging.warning("No port specified. Assuming default port 23...")
@ -242,9 +240,8 @@ class DXCluster:
self.connection.write((password + "\n").encode())
except Exception as e:
message = "Could not create a connection to the Telnet server %s:%d. Check connection to the internets? Check connection details?" % (host, port)
logging.error(message)
logging.exception(e)
error(parent=self.application.window, message=message)
logging.exception(e)
self.connection = None
return

Wyświetl plik

@ -871,7 +871,6 @@ class Logbook:
record = log.get_record_by_index(row_index)
if(record is None):
message = "Could not retrieve record with row_index %d from the SQL database. The record has not been edited." % row_index
logging.error(message)
error(parent=rd.dialog, message=message)
else:
for i in range(0, len(field_names)):

Wyświetl plik

@ -275,7 +275,7 @@ class GeneralPage:
def lookup_callback(self, widget=None):
""" Performs geocoding of the QTH location to obtain latitude-longitude coordinates. """
if(not have_geocoder):
logging.warning("Geocoder module could not be imported. Geocoding aborted.")
error(parent=self.parent, message="Geocoder module could not be imported. Geocoding aborted.")
return
logging.debug("Geocoding QTH location...")
name = self.sources["QTH_NAME"].get_text()

Wyświetl plik

@ -1242,6 +1242,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_general_startup_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_general_startup_vbox">
<property name="visible">True</property>
@ -1282,7 +1284,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkBox" id="general_default_logbook_hbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">4</property>
<property name="spacing">3</property>
<child>
<object class="GtkCheckButton" id="general_default_logbook_checkbutton">
<property name="label" translatable="yes">Open a default logbook</property>
@ -1367,6 +1369,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_general_dialogs_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_general_dialogs_vbox">
<property name="visible">True</property>
@ -1427,6 +1431,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_general_qth_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_general_qth_vbox">
<property name="visible">True</property>
@ -1464,6 +1470,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
@ -1525,6 +1532,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">0</property>
</packing>
</child>
@ -1562,6 +1570,7 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="padding">2</property>
<property name="position">3</property>
</packing>
</child>
@ -2094,6 +2103,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_records_autocomplete_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_records_autocomplete_vbox">
<property name="visible">True</property>
@ -2161,6 +2172,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_records_default_values_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_records_default_values_vbox">
<property name="visible">True</property>
@ -2353,6 +2366,8 @@ along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.</pro
<object class="GtkAlignment" id="preferences_records_callsign_lookup_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_records_callsign_lookup_vbox">
<property name="visible">True</property>
@ -2597,6 +2612,8 @@ Base64-encoded plain text in the configuration file.</property>
<object class="GtkAlignment" id="preferences_adif_import_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_adif_import_vbox">
<property name="visible">True</property>
@ -2667,6 +2684,8 @@ Base64-encoded plain text in the configuration file.</property>
<object class="GtkAlignment" id="preferences_hamlib_support_alignment">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">2</property>
<property name="right_padding">2</property>
<child>
<object class="GtkBox" id="preferences_hamlib_support_vbox">
<property name="visible">True</property>
@ -2926,7 +2945,7 @@ Base64-encoded plain text in the configuration file.</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="tooltip_text" translatable="yes">Callsign Lookup</property>
<property name="tooltip_text" translatable="yes">Callsign lookup</property>
<property name="always_show_image">True</property>
<child>
<object class="GtkImage" id="image26">