10
0
mirror of https://github.com/LCPQ/EMSL_Basis_Set_Exchange_Local synced 2024-12-22 20:34:23 +01:00

try except else

This commit is contained in:
Thomas Applencourt 2015-01-26 09:00:53 +01:00
parent ad2a00cfb9
commit 377297deb7

View File

@ -231,7 +231,7 @@ class EMSL_dump:
if "$" in data_elt: if "$" in data_elt:
if debug: if debug:
print "Eror", print "Eror",
raise Exception("WARNING not bad split") raise Exception("WARNING bad split")
if elt_long_th == elt_long_exp: if elt_long_th == elt_long_exp:
d.append([elt, data_elt.strip()]) d.append([elt, data_elt.strip()])
@ -305,18 +305,21 @@ class EMSL_dump:
try: try:
basis_data = self.basis_data_row_to_array( basis_data = self.basis_data_row_to_array(
text, name, des, elts) text, name, des, elts)
break
except: except:
time.sleep(0.1) time.sleep(0.1)
attemps += 1 attemps += 1
else:
break
try: try:
q_out.put(basis_data) q_out.put(basis_data)
q_in.task_done()
except: except:
if debug: if debug:
print "Fail on q_out.put", basis_data print "Fail on q_out.put", basis_data
raise raise
else:
q_in.task_done()
def enqueue(): def enqueue():
for [name, path_xml, des, elts] in list_basis_array: for [name, path_xml, des, elts] in list_basis_array: