Skip to content

Commit

Permalink
Implement fix for bmwcarit#5
Browse files Browse the repository at this point in the history
  • Loading branch information
nrathaus committed Apr 9, 2023
1 parent 0676874 commit c9e22a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pbapclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions pbapheaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit c9e22a6

Please sign in to comment.