Exception for loading from file caught too
parent
ed9834ea37
commit
e489737f5f
|
@ -348,11 +348,16 @@ class ValidationWidget(QWidget):
|
||||||
self.load_tapes_from_file()
|
self.load_tapes_from_file()
|
||||||
|
|
||||||
def load_tapes_from_file(self):
|
def load_tapes_from_file(self):
|
||||||
|
try:
|
||||||
with open("./source/tapes.yaml", encoding="utf-8") as fp:
|
with open("./source/tapes.yaml", encoding="utf-8") as fp:
|
||||||
tapes = yaml.safe_load(fp)
|
tapes = yaml.safe_load(fp)
|
||||||
|
|
||||||
self.load_tapes(tapes)
|
self.load_tapes(tapes)
|
||||||
|
|
||||||
|
except yaml.scanner.ScannerError as e:
|
||||||
|
dlg = DebugDialog(f"Error applying yaml code:\n\n{str(e)}")
|
||||||
|
dlg.exec()
|
||||||
|
|
||||||
|
|
||||||
def load_tapes(self, tapes):
|
def load_tapes(self, tapes):
|
||||||
self.tapes = tapes
|
self.tapes = tapes
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue