From d5cbb6aa8a6c491291179d1a2ac5dea03cdaa883 Mon Sep 17 00:00:00 2001 From: shrlnm Date: Wed, 23 Oct 2019 09:17:12 +0300 Subject: [PATCH] 9q fix#9 --- pyren/mod_ddt.py | 2 +- pyren/mod_ddt_ecu.py | 4 ++-- pyren/mod_ddt_utils.py | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/pyren/mod_ddt.py b/pyren/mod_ddt.py index 44c6bdd..a810a28 100755 --- a/pyren/mod_ddt.py +++ b/pyren/mod_ddt.py @@ -142,7 +142,7 @@ class DDT(): # Load XML if not self.decu.ecufname.startswith(mod_globals.ddtroot): tmp_f_name = self.decu.ecufname.split('/')[-1] - self.decu.ecufname = mod_globals.ddtroot+'/ecus/'+tmp_f_name + self.decu.ecufname = 'ecus/'+tmp_f_name if not mod_db_manager.file_in_ddt(self.decu.ecufname): print "No such file: ", self.decu.ecufname diff --git a/pyren/mod_ddt_ecu.py b/pyren/mod_ddt_ecu.py index 249e7e5..9bb82dc 100755 --- a/pyren/mod_ddt_ecu.py +++ b/pyren/mod_ddt_ecu.py @@ -304,8 +304,8 @@ class DDTECU(): fname = fname.strip() if len(fname): - self.ecufname = mod_globals.ddtroot+'/ecus/'+fname - if os.path.isfile(self.ecufname): + self.ecufname = 'ecus/'+fname + if mod_db_manager.file_in_ddt(self.ecufname): break else: print "No such file :",self.ecufname diff --git a/pyren/mod_ddt_utils.py b/pyren/mod_ddt_utils.py index 872eef0..6c58c93 100644 --- a/pyren/mod_ddt_utils.py +++ b/pyren/mod_ddt_utils.py @@ -126,9 +126,13 @@ def loadECUlist(): eculist[Address]["targets"][href]['Projects'] = pjcl ail = [] ais = target.findall("ns0:AutoIdents", ns) + if len(ais)==0: + ais = target.findall("AutoIdents") if len(ais): for ai in ais: AutoIdents = ai.findall("ns0:AutoIdent", ns) + if len(AutoIdents)==0: + AutoIdents = ai.findall("AutoIdent") if len(AutoIdents): for AutoIdent in AutoIdents: air = {}