Skip to content

Standardize return type of parse_binary_value to bytes #249

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Xlib/ext/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def pack_value(self, val):
return val, len(val), None

def parse_binary_value(self, data, display, length, format):
return data, ''
return data, b''


class GetVersion(rq.ReplyRequest):
Expand Down
2 changes: 1 addition & 1 deletion Xlib/protocol/rq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ def parse_binary_value(self, data, display, length, format):
v, data = self.string_textitem.parse_binary(data, display)
values.append(v)

return values, ''
return values, b''



Expand Down
3 changes: 2 additions & 1 deletion Xlib/support/unix_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def new_get_auth(sock, dname, protocol, host, dno):

def old_get_auth(sock, dname, host, dno):
# Find authorization cookie
auth_name = auth_data = b''
auth_name = ''
auth_data = b''

try:
# We could parse .Xauthority, but xauth is simpler
Expand Down