Skip to content

Commit 651cc15

Browse files
author
Kirill Kirsanov
committed
fix splitting long messages for python 3
1 parent a841fef commit 651cc15

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

smpplib/gsm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,11 @@ def make_parts(text):
6060
parts = []
6161
ipart = 1
6262
uid = random.randint(0, 255)
63+
print(starts,"asd")
6364
for start in starts:
64-
parts.append(''.join(('\x05\x00\x03', chr(uid),
65-
chr(len(starts)), chr(ipart),
65+
66+
parts.append(b''.join((b'\x05\x00\x03', bytes([uid]),
67+
bytes([len(starts)]), bytes([ipart]),
6668
encode(text[start:start + partsize]))))
6769
ipart += 1
6870
else:

0 commit comments

Comments
 (0)