[XS] Change in ...pyosmocom[master]: utils: h2i(): use list() to convert bytes to integers
laforge has submitted this change. ( https://gerrit.osmocom.org/c/python/pyosmocom/+/39454?usp=email ) ( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: utils: h2i(): use list() to convert bytes to integers ...................................................................... utils: h2i(): use list() to convert bytes to integers Change-Id: Icb0d0803b7ae4e0b3a292ba96f58c26d0ca88abd --- M src/osmocom/utils.py 1 file changed, 1 insertion(+), 1 deletion(-) Approvals: lynxis lazus: Looks good to me, approved Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve diff --git a/src/osmocom/utils.py b/src/osmocom/utils.py index 6c823ec..347bb93 100644 --- a/src/osmocom/utils.py +++ b/src/osmocom/utils.py @@ -78,7 +78,7 @@ def h2i(s: Hexstr) -> List[int]: """convert from a string of hex nibbles to a list of integers""" - return [(int(x, 16) << 4)+int(y, 16) for x, y in zip(s[0::2], s[1::2])] + return list(h2b(s)) def i2h(s: List[int]) -> hexstr: -- To view, visit https://gerrit.osmocom.org/c/python/pyosmocom/+/39454?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: python/pyosmocom Gerrit-Branch: master Gerrit-Change-Id: Icb0d0803b7ae4e0b3a292ba96f58c26d0ca88abd Gerrit-Change-Number: 39454 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
participants (1)
-
laforge