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

gcylc: Fix bug in pop-up for tasks (soon to be) removed #2626

Merged

Conversation

sadielbartholomew
Copy link
Collaborator

@sadielbartholomew sadielbartholomew commented Apr 17, 2018

I have observed a minor bug in the GUI. When attempting to view the prereq's & outputs file from the View menu for task that is completed (naturally I discovered this when trying to access this file for a task that was on the verge of completing & must have completed before I hit the button), one gets either of the following tracebacks on master:

Traceback (most recent call last):
  File "${HOME}/cylc.git/lib/cylc/gui/app_gcylc.py", line 1633, in popup_requisites
    if not results or task_id in bad_items:
UnboundLocalError: local variable 'results' referenced before assignment

or:

Traceback (most recent call last):
  File "${HOME}/cylc.git/lib/cylc/gui/app_gcylc.py", line 1629, in popup_requisites
    results, bad_items = self.updater.client.get_info(
AttributeError: 'NoneType' object has no attribute 'get_info'

To recreate, right-click a task whilst running & keep the menu open until the task has completed & disappeared from the GUI (or is just about to), then click prereq's & outputs.

Suggested change seems to be sufficient, but for safety we might want to catch all exceptions from the try statement or initialise results & bad_items to empty strings?

@sadielbartholomew sadielbartholomew added bug Something is wrong :( small labels Apr 17, 2018
@sadielbartholomew sadielbartholomew added this to the soon milestone Apr 17, 2018
@sadielbartholomew sadielbartholomew self-assigned this Apr 17, 2018
@matthewrmshin matthewrmshin modified the milestones: soon, next release Apr 17, 2018
@hjoliver hjoliver merged commit 8832364 into cylc:master Apr 17, 2018
@sadielbartholomew sadielbartholomew deleted the gcylc-popup-unboundlocalerror branch April 19, 2018 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is wrong :( small
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants