summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-05-23 13:08:26 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-07-03 16:08:55 +0200
commit589c847c775c30cfe6810476ef5dafde8a074763 (patch)
tree9dffb12a46a9613ecb11b0fee10d743c8bc6a5a0
parent7e5cdc9b787f4b73fcd267976fc7e3572b741a71 (diff)
qmi-codegen: fix check for mandatory TLVs in the output bundle
-rw-r--r--build-aux/qmi-codegen/FieldBasic.py2
-rw-r--r--build-aux/qmi-codegen/FieldString.py2
-rw-r--r--build-aux/qmi-codegen/FieldStruct.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/build-aux/qmi-codegen/FieldBasic.py b/build-aux/qmi-codegen/FieldBasic.py
index e04bb1a..dad34bf 100644
--- a/build-aux/qmi-codegen/FieldBasic.py
+++ b/build-aux/qmi-codegen/FieldBasic.py
@@ -85,7 +85,7 @@ class FieldBasic(Field):
utils.le_from_he ('self->' + self.variable_name,
'self->' + self.variable_name,
self.field_type)))
- if self.mandatory is 'yes':
+ if self.mandatory == 'yes':
template = (
'${lp}} else {\n'
'${lp} g_prefix_error (error, \"Couldn\'t get the ${name} TLV: \");\n'
diff --git a/build-aux/qmi-codegen/FieldString.py b/build-aux/qmi-codegen/FieldString.py
index 10bb54a..455741f 100644
--- a/build-aux/qmi-codegen/FieldString.py
+++ b/build-aux/qmi-codegen/FieldString.py
@@ -76,7 +76,7 @@ class FieldString(Field):
'${lp}if (self->${variable_name}) {\n'
'${lp} self->${variable_name}_set = TRUE;\n')
- if self.mandatory is 'yes':
+ if self.mandatory == 'yes':
template += (
'${lp}} else {\n'
'${lp} g_prefix_error (error, \"Couldn\'t get the ${name} TLV: \");\n'
diff --git a/build-aux/qmi-codegen/FieldStruct.py b/build-aux/qmi-codegen/FieldStruct.py
index 3fa28f5..83eda4c 100644
--- a/build-aux/qmi-codegen/FieldStruct.py
+++ b/build-aux/qmi-codegen/FieldStruct.py
@@ -108,7 +108,7 @@ class FieldStruct(Field):
utils.he_from_le ('tmp.' + utils.build_underscore_name(struct_field['name']),
'self->' + self.variable_name + '.' + utils.build_underscore_name(struct_field['name']),
struct_field['format'])))
- if self.mandatory is 'yes':
+ if self.mandatory == 'yes':
template = (
'${lp}} else {\n'
'${lp} g_prefix_error (error, \"Couldn\'t get the ${name} TLV: \");\n'