summaryrefslogtreecommitdiffstats
path: root/tosca2heat/tosca-parser/toscaparser/common/exception.py
diff options
context:
space:
mode:
authorxiaodong shang <shang.xiaodong@zte.com.cn>2017-09-15 17:08:15 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-09-15 17:08:15 +0000
commita224201e408aca8424b076b5e46138b5e322a9ef (patch)
tree45f000714217881cf8ac8eb69778871a2fa3ab11 /tosca2heat/tosca-parser/toscaparser/common/exception.py
parent6b7f69347669e8a8e12e09774935c76e30654eb3 (diff)
parentc1c67048665a6186490b0039407f3d4c8088182f (diff)
Merge "Add required parameters validation for nested service"
Diffstat (limited to 'tosca2heat/tosca-parser/toscaparser/common/exception.py')
-rw-r--r--tosca2heat/tosca-parser/toscaparser/common/exception.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tosca2heat/tosca-parser/toscaparser/common/exception.py b/tosca2heat/tosca-parser/toscaparser/common/exception.py
index 9fb331d..67a9f7f 100644
--- a/tosca2heat/tosca-parser/toscaparser/common/exception.py
+++ b/tosca2heat/tosca-parser/toscaparser/common/exception.py
@@ -20,7 +20,7 @@ import traceback
from toscaparser.utils.gettextutils import _
-log = logging.getLogger(__name__)
+log = logging.getLogger('tosca')
class TOSCAException(Exception):
@@ -207,7 +207,7 @@ class ExceptionCollector(object):
@staticmethod
def removeException(exception_type):
- if ExceptionCollector.collecting:
+ if ExceptionCollector.collecting and ExceptionCollector.exceptions:
for i, e in enumerate(ExceptionCollector.exceptions):
if isinstance(e, exception_type):
del ExceptionCollector.exceptions[i]