summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSunil Shetye2025-05-17 15:39:59 +0530
committerSunil Shetye2025-05-17 15:39:59 +0530
commit294c80e6e428a413d176c35f8d03fc1a0ea3abc1 (patch)
treea79de1a8aa72858438ccc94e45397b68392b0373
parent3b1d76bb8f547a12e19c5103eaa8da4bd6a4e241 (diff)
downloadCommon-Interface-Project-294c80e6e428a413d176c35f8d03fc1a0ea3abc1.tar.gz
Common-Interface-Project-294c80e6e428a413d176c35f8d03fc1a0ea3abc1.tar.bz2
Common-Interface-Project-294c80e6e428a413d176c35f8d03fc1a0ea3abc1.zip
use Exception instead of BaseException
-rwxr-xr-xblocks/Xcos/XmlParser.py4
-rw-r--r--blocks/Xcos/common/AAAAAA.py2
-rw-r--r--blocks/simulationAPI/helpers/ngspice_helper.py4
3 files changed, 5 insertions, 5 deletions
diff --git a/blocks/Xcos/XmlParser.py b/blocks/Xcos/XmlParser.py
index 2905b922..f148ef37 100755
--- a/blocks/Xcos/XmlParser.py
+++ b/blocks/Xcos/XmlParser.py
@@ -114,7 +114,7 @@ for root in model:
mergeLinks(attribid, sourceVertex, key1, graph_link, removable_link)
mergeLinks(attribid, targetVertex, key1, graph_link, removable_link)
- except BaseException:
+ except Exception:
traceback.print_exc()
sys.exit(103)
@@ -288,7 +288,7 @@ for k, r_link in removable_link.items():
root.append(xml_output_port)
- except BaseException:
+ except Exception:
traceback.print_exc()
sys.exit(103)
diff --git a/blocks/Xcos/common/AAAAAA.py b/blocks/Xcos/common/AAAAAA.py
index 3be6fa03..ef425612 100644
--- a/blocks/Xcos/common/AAAAAA.py
+++ b/blocks/Xcos/common/AAAAAA.py
@@ -1771,7 +1771,7 @@ def process_xcos_model(diagram, title, rootattribid, parentattribid,
link_data = (attribid, sourceVertex, targetVertex, sourceType, targetType, style, waypoints, addSplit, split_point, split_point2)
edgeDict[attribid] = link_data
edgeList.append(link_data)
- except BaseException:
+ except Exception:
traceback.print_exc()
sys.exit(127)
oldcellslength = cellslength
diff --git a/blocks/simulationAPI/helpers/ngspice_helper.py b/blocks/simulationAPI/helpers/ngspice_helper.py
index 4bfd5e7d..58104749 100644
--- a/blocks/simulationAPI/helpers/ngspice_helper.py
+++ b/blocks/simulationAPI/helpers/ngspice_helper.py
@@ -99,7 +99,7 @@ def CreateXml(file_path, parameters, task_id, workspace_file):
logger.info('Ran %s', 'XmlToXcos')
return xcosfile
- except BaseException as e:
+ except Exception as e:
logger.exception('Encountered Exception:')
logger.info('removing %s', file_path)
remove(file_path)
@@ -137,7 +137,7 @@ def ExecXml(task, task_name, workspace_file):
logger.warning('Simulation failed for task %s: %s', task_id, result)
return 'Failure'
- except BaseException as e:
+ except Exception as e:
logger.exception('Encountered Exception during XML Execution:')
logger.info('Cleaning up files for task %s', task_id)
# Cleanup