aboutsummaryrefslogtreecommitdiff
path: root/scripts/qapi/common.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/qapi/common.py')
-rw-r--r--scripts/qapi/common.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py
index 3d7272a702..63a2e502fb 100644
--- a/scripts/qapi/common.py
+++ b/scripts/qapi/common.py
@@ -207,7 +207,7 @@ def cgen_ifcond(ifcond: Union[str, Dict[str, Any]]) -> str:
return ifcond
oper, operands = next(iter(ifcond.items()))
- oper = {'all': '&&'}[oper]
+ oper = {'all': '&&', 'any': '||'}[oper]
operands = [cgen_ifcond(o) for o in operands]
return '(' + (') ' + oper + ' (').join(operands) + ')'
@@ -220,7 +220,7 @@ def docgen_ifcond(ifcond: Union[str, Dict[str, Any]]) -> str:
return ifcond
oper, operands = next(iter(ifcond.items()))
- oper = {'all': ' and '}[oper]
+ oper = {'all': ' and ', 'any': ' or '}[oper]
operands = [docgen_ifcond(o) for o in operands]
return '(' + oper.join(operands) + ')'