1
0
mirror of https://github.com/JoelBender/bacpypes synced 2025-10-27 00:57:47 +08:00

added unicode tests #139

This commit is contained in:
Joel Bender
2017-09-19 19:33:24 -04:00
parent 81024b664d
commit 66dac1f878
3 changed files with 163 additions and 20 deletions

View File

@@ -91,7 +91,7 @@ class Address:
self.addrAddr = struct.pack('B', addr)
self.addrLen = 1
elif isinstance(addr, str):
elif isinstance(addr, basestring):
if _debug: Address._debug(" - str")
m = ip_address_mask_port_re.match(addr)
@@ -263,7 +263,7 @@ class Address:
addr, port = addr
self.addrPort = int(port)
if isinstance(addr, str):
if isinstance(addr, basestring):
if not addr:
# when ('', n) is passed it is the local host address, but that
# could be more than one on a multihomed machine, the empty string