Skip to content
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

add: python3 support + default formatting rules #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YYYasin19
Copy link

Hi,

not sure whether this can be helpful for anyone in the future, but I've updated some of the lines to be compatible with Python3. The functionality should be unchanged.

Thanks for making this!

@EpicOrange
Copy link

EpicOrange commented Apr 13, 2023

Thanks for doing this! I also had to update these lines:

rawHeader = struct.pack(efiHeaderFmt,
efiSignature, efiExpectedVersion,
efiHeaderExpectedSize, 0,

==>

 	 rawHeader = struct.pack(efiHeaderFmt.format('utf-8'), 
	                         efiSignature.format('utf-8'), efiExpectedVersion.format('utf-8'), 
	                         efiHeaderExpectedSize, 0, 

and

disk.write("\x00" * (blockSize - len(header)))

==>

 	 disk.write(b"\x00" * (blockSize - len(header)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants