Minor fixes to CI python scripts
- enhanced CustomCommand logging - print ParseError
This commit is contained in:
+2
-2
@@ -579,8 +579,8 @@ elif re.match('^InitiateHtml$', mode, re.IGNORECASE):
|
|||||||
if (os.path.isfile(xml_test_file)):
|
if (os.path.isfile(xml_test_file)):
|
||||||
try:
|
try:
|
||||||
xmlTree = ET.parse(xml_test_file)
|
xmlTree = ET.parse(xml_test_file)
|
||||||
except:
|
except Exception as e:
|
||||||
print("Error while parsing file: " + xml_test_file)
|
print(f"Error: {e} while parsing file: {xml_test_file}.")
|
||||||
xmlRoot = xmlTree.getroot()
|
xmlRoot = xmlTree.getroot()
|
||||||
HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count)))
|
HTML.htmlTabRefs.append(xmlRoot.findtext('htmlTabRef',default='test-tab-' + str(count)))
|
||||||
HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='test-tab-' + str(count)))
|
HTML.htmlTabNames.append(xmlRoot.findtext('htmlTabName',default='test-tab-' + str(count)))
|
||||||
|
|||||||
+1
-1
@@ -264,7 +264,7 @@ class RANManagement():
|
|||||||
cmd = cls_cmd.getConnection(self.node)
|
cmd = cls_cmd.getConnection(self.node)
|
||||||
ret = cmd.run(self.command)
|
ret = cmd.run(self.command)
|
||||||
cmd.close()
|
cmd.close()
|
||||||
logging.debug(f"Custum command : {self.command} on node : {self.node} returnCode : {ret.returncode}")
|
logging.debug(f"CustomCommand: {self.command} on node: {self.node} - {'OK, command succeeded' if ret.returncode == 0 else f'Error, return code: {ret.returncode}'}")
|
||||||
status = 'OK'
|
status = 'OK'
|
||||||
message = []
|
message = []
|
||||||
if ret.returncode != 0 and not self.command_fail:
|
if ret.returncode != 0 and not self.command_fail:
|
||||||
|
|||||||
Reference in New Issue
Block a user