Skip to content

Commit c50822d

Browse files
committed
changing bare except to checking if destroy is necessary, Chris can you check this is what you were try/excepting for, testing seems fine NO_JIRA
1 parent fdbe8c0 commit c50822d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/voids_search/voids_search.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,8 @@ def get_query_text():
9393
# Vars are where it retrieves the app outputs (the values you entered) into the query
9494
values = {k: v for k, v in zip(pore_query_dict.keys(), app.outputs)}
9595

96-
try:
96+
if root.winfo_exists():
9797
root.destroy()
98-
except:
99-
pass
10098

10199
return values
102100

@@ -170,7 +168,7 @@ def run_search(interface=None):
170168
query_report = str()
171169
# Error out if the compound name given is empty
172170
if len("".join(void_search_dict.values())) == 0:
173-
interface.show_script_error('''Nothing was given to search for. Please enter either one number
171+
interface.show_script_error('''Nothing was given to search for. Please enter either one number
174172
(to search +/- 5 %) or two numbers separated by a "-" in one of the available boxes''')
175173
return
176174

@@ -251,7 +249,7 @@ def run_search(interface=None):
251249
data=f"""
252250
Query: {query_report} <br>
253251
Result:{len(refcode_list)} hits in {len(set(refcode_list))} structures <br>
254-
More information on the pore calculations is available here:
252+
More information on the pore calculations is available here:
255253
<a href="https://downloads.ccdc.cam.ac.uk/documentation/API/descriptive_docs/calculated_properties.html">
256254
link
257255
</a>

0 commit comments

Comments
 (0)