diff options
author | 2018-08-15 16:05:39 +0000 | |
---|---|---|
committer | 2018-08-15 16:05:39 +0000 | |
commit | 11252fd2c44468d850eca6679706e2a85f702fd8 (patch) | |
tree | 0312f1815afbd58d43a90598cb7eff6da74e4514 /tosca2heat/tosca-parser/toscaparser/common/exception.py | |
parent | b76a5327b15e3530439db43e1d9d7e29ad5b5d1d (diff) | |
parent | 0a5370bd4de5d17de58d0a71e7683210df0a0352 (diff) |
Merge "parameter -nrpv not fuctioning in toscaparser"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/common/exception.py')
-rw-r--r-- | tosca2heat/tosca-parser/toscaparser/common/exception.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/common/exception.py b/tosca2heat/tosca-parser/toscaparser/common/exception.py index 67a9f7f..d36a714 100644 --- a/tosca2heat/tosca-parser/toscaparser/common/exception.py +++ b/tosca2heat/tosca-parser/toscaparser/common/exception.py @@ -207,10 +207,14 @@ class ExceptionCollector(object): @staticmethod def removeException(exception_type): - if ExceptionCollector.collecting and ExceptionCollector.exceptions: + # if ExceptionCollector.collecting and ExceptionCollector.exceptions: + if ExceptionCollector.exceptions: + tmp_exceptions = [] for i, e in enumerate(ExceptionCollector.exceptions): - if isinstance(e, exception_type): - del ExceptionCollector.exceptions[i] + if not isinstance(e, exception_type): + tmp_exceptions.append(e) + # del ExceptionCollector.exceptions[i] + ExceptionCollector.exceptions = tmp_exceptions @staticmethod def exceptionsCaught(): |