process empty str
This commit is contained in:
parent
187f0de25a
commit
f5434bdbd0
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,8 @@ def pack_addr(address):
|
||||||
return b'\x03' + chr(len(address)) + address
|
return b'\x03' + chr(len(address)) + address
|
||||||
|
|
||||||
def pre_parse_header(data):
|
def pre_parse_header(data):
|
||||||
|
if not data:
|
||||||
|
return None
|
||||||
datatype = ord(data[0])
|
datatype = ord(data[0])
|
||||||
if datatype == 0x80:
|
if datatype == 0x80:
|
||||||
if len(data) <= 2:
|
if len(data) <= 2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue