python/osmo-python-tests[master]: Fix parsing for python3

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Nov 27 13:55:55 UTC 2017


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/5028/1/osmopy/osmo_ipa.py
File osmopy/osmo_ipa.py:

Line 241:         if s == self.CTRL_ERR:
so you are splitting bytes into smaller bytes, then you go on to compare against string constants ... Instead, you may want to do

  data_str = data.decode('utf-8')

If we're allowing arbitrary bytes in the value, you want to do the decode step after the split... But there should be some decode step *somewhere*. I wonder why this alone seems to be working for you, it should still cause encoding problems.


-- 
To view, visit https://gerrit.osmocom.org/5028
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I599f9f5a18109929f59386ab4416b8bfd75c74d1
Gerrit-PatchSet: 1
Gerrit-Project: python/osmo-python-tests
Gerrit-Branch: master
Gerrit-Owner: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-HasComments: Yes



More information about the gerrit-log mailing list