diff options
author | Ran Benita <ran234@gmail.com> | 2014-10-12 21:58:10 +0300 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2015-03-15 11:39:00 +0100 |
commit | 2871d4b1b8736044ba50df2f7dacfcc65d820fa9 (patch) | |
tree | d78e5c62a8d37eb92eb409668986292c486054a4 /src | |
parent | 30976e5255a25117d17d4d8162e29b84913953cd (diff) |
c_client.py: no need to compare bools to True/False
Signed-off-by: Ran Benita <ran234@gmail.com>
Reviewed-by: Christian Linhart <chris@demorecorder.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/c_client.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/c_client.py b/src/c_client.py index c841384..c16e729 100644 --- a/src/c_client.py +++ b/src/c_client.py @@ -603,7 +603,7 @@ def _c_helper_field_mapping(complex_type, prefix, flat=False): else: bitcase_prefix = prefix - if (True==flat and not b.type.has_name) or False==flat: + if (flat and not b.type.has_name) or not flat: all_fields.update(_c_helper_field_mapping(b.type, bitcase_prefix, flat)) else: for f in complex_type.fields: @@ -612,7 +612,7 @@ def _c_helper_field_mapping(complex_type, prefix, flat=False): raise Exception("field name %s has been registered before" % f.field_name) all_fields[f.field_name] = (fname, f) - if f.type.is_container and flat==False: + if f.type.is_container and not flat: if f.type.is_case_or_bitcase and not f.type.has_name: new_prefix = prefix elif f.type.is_switch and len(f.type.parents)>1: |