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

Unable to get VSI details when last TXN is "Software install is finis… #1625

Merged
merged 2 commits into from
Apr 28, 2022

Conversation

caberos
Copy link
Contributor

@caberos caberos commented Apr 26, 2022

Copy link
Member

@allmightyspiff allmightyspiff left a comment

Choose a reason for hiding this comment

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

Thanks for taking care of this, just a minor style change needed.

last_transaction = "{} ({})".format(utils.lookup(result, 'lastTransaction', 'transactionGroup', 'name'),
utils.clean_time(utils.lookup(result, 'lastTransaction', 'modifyDate')))
last_transaction = ''
if result.get('lastTransaction') != []:
Copy link
Member

Choose a reason for hiding this comment

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

You can just do the following, which will also work if lastTransaction is None. Empty list and dictionaries return False in python.

Suggested change
if result.get('lastTransaction') != []:
if result.get('lastTransaction'):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unable to get VSI details when last TXN is "Software install is finished"
2 participants