Skip to content

Commit

Permalink
Fix small syntax error. (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabien-B committed Jun 10, 2021
1 parent 2c023e2 commit 265e643
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/v1.0/python/pprzlink/message.py
Expand Up @@ -210,10 +210,10 @@ def ivy_string_to_payload(self, data):
for el in re.split('([|\"][^|\"]*[|\"])', data):
if '|' not in el and '"' not in el:
# split non-array strings further up
for e in [d for d in el.split(' ') if d is not '']:
for e in [d for d in el.split(' ') if d != '']:
if ',' in e:
# array but not a string
values.append([x for x in e.split(',') if x is not ''])
values.append([x for x in e.split(',') if x != ''])
else:
# not an array
values.append(e)
Expand Down
4 changes: 2 additions & 2 deletions lib/v2.0/python/pprzlink/message.py
Expand Up @@ -225,10 +225,10 @@ def ivy_string_to_payload(self, data):
for el in re.split('([|\"][^|\"]*[|\"])', data):
if '|' not in el and '"' not in el:
# split non-array strings further up
for e in [d for d in el.split(' ') if d is not '']:
for e in [d for d in el.split(' ') if d != '']:
if ',' in e:
# array but not a string
values.append([x for x in e.split(',') if x is not ''])
values.append([x for x in e.split(',') if x != ''])
else:
# not an array
values.append(e)
Expand Down

0 comments on commit 265e643

Please sign in to comment.