diff options
author | Kevin Rocard <kevinx.rocard@intel.com> | 2013-06-10 15:31:32 +0200 |
---|---|---|
committer | David Wagner <david.wagner@intel.com> | 2014-02-12 17:03:59 +0100 |
commit | d077c557e360615a67d97ee249260a1ef7919f09 (patch) | |
tree | e21dc32ee358a7d4134b9d80a378a2236b45117c /tools | |
parent | 556538e2bda03b54bdd82c5813a5286e90a39f67 (diff) | |
download | external_parameter-framework-d077c557e360615a67d97ee249260a1ef7919f09.zip external_parameter-framework-d077c557e360615a67d97ee249260a1ef7919f09.tar.gz external_parameter-framework-d077c557e360615a67d97ee249260a1ef7919f09.tar.bz2 |
[Coverage] Raise duplicated criterion specialised exception
BZ: 115218
When an element is requested to adopt multiple times the same element, the
"DuplicatedChildError" exception is raised.
However, in case of PFW restart, existing criteria are recreated, which
is throwing the generic "DuplicatedChildError" exception.
As such event need to be detected, specialise the "DuplicatedChildError"
exception in "DuplicatedCriterionError" in order to catch the event
easily.
Change-Id: Ib0cca1d318233ca0b2f69fd277740ce8f5a550ad
Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com>
Reviewed-on: http://android.intel.com:8080/112712
Reviewed-by: Denneulin, Guillaume <guillaume.denneulin@intel.com>
Reviewed-by: Gonzalve, Sebastien <sebastien.gonzalve@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: Dixon, CharlesX <charlesx.dixon@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/coverage.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/coverage.py b/tools/coverage.py index 5a00f45..4f87b27 100755 --- a/tools/coverage.py +++ b/tools/coverage.py @@ -678,6 +678,9 @@ class Criterion(Element): class Criteria(Element): tag = "Criteria" + class DuplicatedCriterionError(DuplicatedChildError): + pass + def export(self): self.debug("Exporting criteria") assert(self.children) @@ -689,7 +692,7 @@ class Criteria(Element): def addChild(self, child): if child in self.children: - raise DuplicatedChildError(self, child) + raise self.DuplicatedCriterionError(self, child) super().addChild(child) class ConfigAppliedWithoutCriteriaError(CustomError): |