mirror of
https://github.com/Xevion/bulk-reminders.git
synced 2025-12-08 12:06:36 -06:00
Show errors in data in Load Events Dialog
This commit is contained in:
@@ -42,8 +42,12 @@ class LoadDialog(QDialog, Ui_Dialog):
|
|||||||
"""Parse the events entered into the dialog"""
|
"""Parse the events entered into the dialog"""
|
||||||
self.spinner.hide()
|
self.spinner.hide()
|
||||||
results = [result.groups() for result in re.finditer(REGEX, self.plainTextEdit.toPlainText())]
|
results = [result.groups() for result in re.finditer(REGEX, self.plainTextEdit.toPlainText())]
|
||||||
self.eventCountLabel.setText(f'{len(results)} group{"s" if len(results) != 1 else ""} found.')
|
resultsText = f'{len(results)} group{"s" if len(results) != 1 else ""} found.'
|
||||||
self.parsed = list(map(Event.parse_raw, results))
|
try:
|
||||||
|
self.parsed = list(map(Event.parse_raw, results))
|
||||||
|
except ValueError:
|
||||||
|
resultsText += ' Data error.'
|
||||||
|
self.eventCountLabel.setText(resultsText)
|
||||||
|
|
||||||
def edited(self) -> None:
|
def edited(self) -> None:
|
||||||
"""Prepare a timer to be fired to parse the edited text"""
|
"""Prepare a timer to be fired to parse the edited text"""
|
||||||
|
|||||||
Reference in New Issue
Block a user