-
Notifications
You must be signed in to change notification settings - Fork 192
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
Fix UnboundLocalError
in aiida.cmdline.utils.edit_multiline_template
#4436
Fix UnboundLocalError
in aiida.cmdline.utils.edit_multiline_template
#4436
Conversation
If `click.edit` returns a falsy value, the following conditional would be skipped and the `value` variable would be undefined causing an `UnboundLocalError` to be raised. This bug was reported by @blokhin but the exact conditions under which it occurred are not clear.
Codecov Report
@@ Coverage Diff @@
## develop #4436 +/- ##
===========================================
- Coverage 79.36% 79.36% -0.00%
===========================================
Files 476 476
Lines 34950 34950
===========================================
- Hits 27734 27733 -1
- Misses 7216 7217 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
I find one occurrence of this error, that is when setup a computer: when verdi asks for |
@chrisjsewell and @ramirezfranciscof this has been open for a while and needs to go in the next release. Would be good if any you two can review 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.
Yep seems pretty trivial to me 👍
…te` (#4436) If `click.edit` returns a falsy value, the following conditional would be skipped and the `value` variable would be undefined causing an `UnboundLocalError` to be raised. This bug was reported by @blokhin but the exact conditions under which it occurred are not clear. Cherry-pick: 861a39f
Fixes #4435
If
click.edit
returns a falsy value, the following conditional wouldbe skipped and the
value
variable would be undefined causing anUnboundLocalError
to be raised. This bug was reported by @blokhin butthe exact conditions under which it occurred are not clear.