Clean up exception handling in TestON core
- Catch more specific exceptions
- Clearer Style
- Allow CTRL-C to exit the test cleanly whether from the TestON
cli or ruinning as a script
Change-Id: I7f2e8eeba5229f97c87e06b49a585933a61fa4ad
diff --git a/TestON/core/xmldict.py b/TestON/core/xmldict.py
index 2cc47da..8d1dcf4 100644
--- a/TestON/core/xmldict.py
+++ b/TestON/core/xmldict.py
@@ -37,7 +37,7 @@
root = ElementTree.XML(root_or_str)
try :
return {root.tag: _from_xml(root, strict)}
- except Exception:
+ except StandardError:
return None
def dict_to_xml(dict_xml):