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

Avoid an exception in device_path_to_unix_path #19

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

srwalter
Copy link

Don't try to use dir_path if it is None. This avoids the exception:

unsupported operand type(s) for +: 'NoneType' and 'str'

srwalter added 2 commits June 30, 2023 15:38
Don't try to use dir_path if it is None.  This avoids the exception:

    unsupported operand type(s) for +: 'NoneType' and 'str'
Since we don't have any information about which device this path refers
to, it's unlikely to actually exist in its present form.  However, if we
return it then at least the --substitute-bsa-unix-path mechanism has a
chance to turn it into something useful.
@yangzhaofeng
Copy link
Contributor

Does this one work for you? In my case, I assigned dir_path to device_path_to_unix_path to make it a static variable, so dir_path can keep /boot/efi if next time no MediaDevicePathSubtype.HardDrive in pp.subtype. Not dare rebooting...

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