Fixed issue #556

This commit is contained in:
windcrusader
2020-05-24 19:53:32 +12:00
parent 85525a230f
commit ea11bb76a0

View File

@@ -140,7 +140,7 @@ class StationData(object):
def validate_string(buf):
if len(buf) != PACKET_SIZE:
raise weewx.WeeWxIOError("Unexpected buffer length %d" % len(buf))
if buf[0:2] != '!!':
if buf[0:2] != b'!!':
raise weewx.WeeWxIOError("Unexpected header bytes '%s'" % buf[0:2])
return buf