diff options
Diffstat (limited to 'scripts/qapi/schema.py')
-rw-r--r-- | scripts/qapi/schema.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index 703b446fd2..c277fcacc5 100644 --- a/scripts/qapi/schema.py +++ b/scripts/qapi/schema.py @@ -20,7 +20,7 @@ import re from typing import Optional from .common import POINTER_SUFFIX, c_name -from .error import QAPIError, QAPISemError +from .error import QAPISemError, QAPISourceError from .expr import check_exprs from .parser import QAPISchemaParser @@ -875,7 +875,8 @@ class QAPISchema: other_ent = self._entity_dict.get(ent.name) if other_ent: if other_ent.info: - where = QAPIError(other_ent.info, None, "previous definition") + where = QAPISourceError(other_ent.info, None, + "previous definition") raise QAPISemError( ent.info, "'%s' is already defined\n%s" % (ent.name, where)) |