@@ -321,16 +321,17 @@ def __setattr__(self, name, value):
321321 """ .format (name , type (self ).__name__ , similar_objects )
322322
323323 raise AttributeError (ERROR_MSG )
324+
325+ # Setting the account or partition name will automatically result in
326+ # activating the corresponding flags
327+ if name .endswith ("_name" ):
328+ key = "use_{}" .format (name .split ("_" )[0 ])
329+ self .__dict__ [key ] = True
324330 else :
325331 super (Cluster , self ).__setattr__ (name , value )
326332
327333
328- # Setting the account or partition name will automatically result in
329- # activating the corresponding flags
330- if name .endswith ("_name" ):
331- key = "use_{}" .format (name .split ("_" )[0 ])
332- self .__dict__ [key ] = True
333-
334+
334335
335336
336337 def ExecuteCMD (self , cmd , raise_error = False , return_output = False , on_cluster = False ):
@@ -621,12 +622,16 @@ def prepare_input_file(self, structures, calc, labels):
621622
622623 list_of_inputs .append (input_file )
623624 list_of_outputs .append (output_file )
624- except :
625+ except Exception as e :
625626 MSG = '''
626627Error while writing input file {}.
628+
629+ Error message:
627630''' .format (label )
631+ MSG += str (e )
628632 print (MSG )
629633
634+
630635 # Release the lock on the threads
631636 self .lock .release ()
632637
0 commit comments