Skip to content

Conversation

@herheliuk
Copy link
Member

@herheliuk herheliuk commented Oct 18, 2025

Regardless of the actual error message, "Unknown" was always appended
to the end of the string, resulting in messages like:
"DUMP failed: Error(3): No process with such pidUnknown".

Fixed by changing standalone if statements to else-if blocks so
"Unknown" is only added when no specific error condition matches.

Signed-off-by: Andrii Herheliuk andrii@herheliuk.com

@herheliuk herheliuk changed the title lib/pycriu/criu.py: prevent always appending "Unknown" to error messages pycriu: prevent always appending "Unknown" to error messages Oct 18, 2025
Regardless of the actual error message, "Unknown" was always appended
to the end of the string, resulting in messages like:
"DUMP failed: Error(3): No process with such pidUnknown".

Fixed by changing standalone if statements to else-if blocks so
"Unknown" is only added when no specific error condition matches.

Signed-off-by: Andrii Herheliuk <andrii@herheliuk.com>
@herheliuk herheliuk changed the title pycriu: prevent always appending "Unknown" to error messages pycriu: prevent trailing "Unknown" in error messages Oct 19, 2025
@herheliuk
Copy link
Member Author

herheliuk commented Oct 19, 2025

if you don't like elifs:

if not self.errno:
    s += "Unknown"

instead of:

s += "Unknown"

@avagin
Copy link
Member

avagin commented Oct 19, 2025

LGTM. Thanks.

@rst0git rst0git merged commit d25d829 into checkpoint-restore:criu-dev Oct 19, 2025
37 of 44 checks passed
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.

3 participants