From 7a9a3488bbc8768ba0c7fe16856d4b72e7274005 Mon Sep 17 00:00:00 2001 From: Maxime Perrotin Date: Wed, 31 Jul 2019 13:52:06 +0100 Subject: [PATCH] Add an attribute check --- asn1_value_editor/Scenario.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/asn1_value_editor/Scenario.py b/asn1_value_editor/Scenario.py index c218982..9260214 100644 --- a/asn1_value_editor/Scenario.py +++ b/asn1_value_editor/Scenario.py @@ -59,9 +59,13 @@ class Scenario(QThread, object): try: mod = importlib.import_module(backend + '_backend') except ImportError: - self.log.put((self.name, 'ERROR', - 'Could not import {b}_backend.py' - .format(b=backend))) + try: + self.log.put((self.name, 'ERROR', + 'Could not import {b}_backend.py' + .format(b=backend))) + except AttributeError: + print("ERROR: could not import {}_backend.py" + .format(backend)) continue mod.setMsgQ() # set the ASN.AST into the backend module, needed to convert VN -- GitLab