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

Set installed traitlets of pseudo/qe install widget when it's done #262

Merged
merged 3 commits into from
Aug 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions aiidalab_qe/setup_codes.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,12 @@ def _refresh_installed(self):
for msg in install():
self.set_message(msg)

self.installed = True

except Exception as error:
self.set_message("Failed to setup QE on localhost.")
self.set_trait("error", str(error))
FN_DO_NOT_SETUP.touch()
else:
self.set_trait("installed", True)
csadorf marked this conversation as resolved.
Show resolved Hide resolved
self.set_message("OK")
finally:
self.set_trait("busy", False)
Expand Down
2 changes: 2 additions & 0 deletions aiidalab_qe/sssp.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ def _refresh_installed(self):
self.set_trait("error", str(error))
self.set_message(str(error))
else:
# If all the libraries are install by hands `pseudos_to_install()` will be empty list.
self.set_trait("installed", not bool(pseudos_to_install()))
self.set_message("OK")
finally:
self.set_trait("busy", False)
Expand Down