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

Return the local varriable to delay the desctruction of the xml file #4016

Conversation

liang-cong-red-hat
Copy link
Contributor

@liang-cong-red-hat liang-cong-red-hat commented Oct 25, 2024

When we use migration option --xml or --persistent-xml, we need provide a existing xml file, but in _update_xmlfile_path_in_migrate_options() vmxml object is a local variable, it will be released after the _update_xmlfile_path_in_migrate_options() is done, so the xml file with vmxml object is released at the same time.

That will cause the migration fail. So return the local variable would delay the destruction after the migration.

Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dzhengfy dzhengfy merged commit fc37acd into avocado-framework:master Jan 13, 2025
50 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants