[PATCH v3 4/5] qmi-codegen: allow empty input fields
Thomas Weißschuh
thomas at t-8ch.de
Thu Feb 22 22:43:19 UTC 2018
The LOC service allows empty messages to trigger the sending of certain
indicator messages.
---
build-aux/qmi-codegen/Message.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/build-aux/qmi-codegen/Message.py b/build-aux/qmi-codegen/Message.py
index 0bf62f1..ea6622b 100644
--- a/build-aux/qmi-codegen/Message.py
+++ b/build-aux/qmi-codegen/Message.py
@@ -121,7 +121,7 @@ class Message:
' ${message_id});\n' % input_arg_template)
cfile.write(string.Template(template).substitute(translations))
- if self.input.fields is not None:
+ if self.input.fields:
# Count how many mandatory fields we have
n_mandatory = 0
for field in self.input.fields:
@@ -179,7 +179,7 @@ class Message:
cfile.write(
'\n'
' return self;\n')
- if self.input.fields is not None:
+ if self.input.fields:
cfile.write(
'\n'
'error_out:\n'
--
2.16.2
More information about the libqmi-devel
mailing list