-
Notifications
You must be signed in to change notification settings - Fork 53
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
Ignore parted warnings if possible #216
Conversation
This seems to work but I have a hard time creating a test case that throws a parted warning so I gave up on it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise this looks good to me, thanks!
src/plugins/part_err.c
Outdated
/* | ||
* Only treat exceptions as errors if they aren't at least errors or can't | ||
* be ignored. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aren't
should be are
, shouldn't it?
src/plugins/part_err.c
Outdated
return PED_EXCEPTION_UNHANDLED; | ||
} | ||
g_warning ("[parted] %s", ex->message); | ||
return PED_EXCEPTION_IGNORE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if the logic was inverted here. So something like if THIS_CAN_BE_IGNORED -> ignore; else raise
Ignore parted exceptions of type warning or information if parted marks them as ignorable.
There you go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Jenkins, this is ok to test. |
Ignore parted exceptions of type warning and information if parted marks them as ignorable. Fixes #214.
I haven't tested this yet *cough*. Plus I should probably add at least one test case in which a parted warning is ignored. So please don't merge yet.