Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
daxartio committed Feb 22, 2018
1 parent 3c94b06 commit b0d10c0
Show file tree
Hide file tree
Showing 46 changed files with 104 additions and 98 deletions.
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/bib_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/bib_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
4 changes: 2 additions & 2 deletions sportorg/gui/dialogs/course_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down Expand Up @@ -131,7 +131,7 @@ def apply_changes_impl(self):
try:
control.length = int(i.split()[1])
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
control.length = 0
course.controls.append(control)

Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/cp_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/entry_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/entry_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def accept(self):

GlobalAccess().get_main_window().refresh()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))

self.destroy()

Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/event_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/group_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
4 changes: 2 additions & 2 deletions sportorg/gui/dialogs/group_ranking.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def init_ui(self):
try:
self.layout.addRow(get_widget_from_ranking(cur_item))
except:
logging.exception()
logging.error()

def cancel_changes():
self.close()
Expand All @@ -44,7 +44,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/live_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/not_start_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/organization_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
6 changes: 3 additions & 3 deletions sportorg/gui/dialogs/print_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down Expand Up @@ -112,7 +112,7 @@ def set_values(self):
# try:
# QPrinter().setPrinterName(printer_name)
# except Exception as e:
# logging.exception(str(e))
# logging.error(str(e))
# printer_name = default_printer_name
self.selected_split_printer.setText(printer_name)

Expand All @@ -130,7 +130,7 @@ def select_printer(self):
pd.exec()
return printer.printerName()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
return None

def apply_changes_impl(self):
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/relay_number_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def apply_changes():
except FileNotFoundError as e:
logging.error(str(e))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/results_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/scores_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/search_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def accept(self):
self.table.selectRow(offset)
logging.info('Search: {}'.format(proxy_model.search))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))

def reject(self):
self.destroy()
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/start_chess_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/start_preparation.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ def accept(self):
GlobalAccess().get_main_window().refresh()
self.save_state()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))

def save_state(self):
obj = race()
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/start_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def apply_changes():
except FileNotFoundError as e:
logging.error(str(e))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/start_time_change_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/statistics_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def apply_changes():
except FileNotFoundError as e:
logging.error(str(e))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/team_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def apply_changes():
except FileNotFoundError as e:
logging.error(str(e))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/team_results_report_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def apply_changes():
except FileNotFoundError as e:
logging.error(str(e))
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/teamwork_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
4 changes: 2 additions & 2 deletions sportorg/gui/dialogs/text_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_text_wrapper(self):

self.text_edit.setPlainText(get_text(index, key, separator))
except Exception as e:
logging.exception(e)
logging.error(e)

def accept(self):
try:
Expand Down Expand Up @@ -181,7 +181,7 @@ def accept(self):
logging.debug('text_io: empty value for line ' + i)
logging.debug('text_io: processed ' + str(success_count) + ' from ' + str(len(lines)) + ' lines')
except Exception as e:
logging.exception(e)
logging.error(e)

self.close()

Expand Down
2 changes: 1 addition & 1 deletion sportorg/gui/dialogs/timekeeping_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def apply_changes():
try:
self.apply_changes_impl()
except Exception as e:
logging.exception(str(e))
logging.error(str(e))
self.close()

button_box = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
Expand Down
Loading

0 comments on commit b0d10c0

Please sign in to comment.