diff --git a/pbapclient.py b/pbapclient.py index 324c6bf..263c421 100644 --- a/pbapclient.py +++ b/pbapclient.py @@ -48,7 +48,7 @@ def pull_phonebook( "ListStartOffset": headers.ListStartOffset(list_startoffset), } application_parameters = headers.App_Parameters(data, encoded=False) - header_list = [headers.PBAPType("x-bt/phonebook")] + header_list = [headers.PBAPType(b"x-bt/phonebook")] if application_parameters.data: header_list.append(application_parameters) diff --git a/pbapheaders.py b/pbapheaders.py index 88ceee9..29dcc9f 100644 --- a/pbapheaders.py +++ b/pbapheaders.py @@ -70,11 +70,11 @@ def encode(self, data): def decode(self): headers, data = super(VariableLengthProperty, self).decode() - tagid, length = headers + _, length = headers return struct.unpack(self.fmt.format(len=length), data)[0] -class PBAPType(UnicodeHeader): +class PBAPType(Type): code = 0x42