diff --git a/wetb/hawc2/ascii2bin/make_exe.py b/wetb/hawc2/ascii2bin/make_exe.py index 8b1e848075529830a94f1595d1fb5fb2332061a3..8a1682a0094bd8431af40786ba5cf42ff2431034 100644 --- a/wetb/hawc2/ascii2bin/make_exe.py +++ b/wetb/hawc2/ascii2bin/make_exe.py @@ -9,6 +9,6 @@ standard_library.install_aliases() if __name__=="__main__": - from build_exe.cx.build_cx_exe import NUMPY - from build_exe.cx import build_cx_exe + from mmpe.build_exe.cx.build_cx_exe import NUMPY + from mmpe.build_exe.cx import build_cx_exe build_cx_exe.build_exe("ascii2bin.py", version="3.0.1", includes=["'pandas'"], modules=['email', NUMPY]) diff --git a/wetb/hawc2/htc_file.py b/wetb/hawc2/htc_file.py index 9c4761b6bda21d6343a58dd28fcfab3e80e09018..fc51e0768152a51d46cc18532768cc34f0d42ba2 100644 --- a/wetb/hawc2/htc_file.py +++ b/wetb/hawc2/htc_file.py @@ -43,13 +43,21 @@ class HTCFile(HTCContents, HTCDefaults): modelpath = "../" initial_comments = None _contents = None - def __init__(self, filename=None, relative_modelpath="../"): + def __init__(self, filename=None, modelpath="../"): + """ + Parameters + --------- + filename : str + Absolute filename of htc file + modelpath : str + Model path relative to htc file + """ if filename is not None: - self.modelpath = os.path.realpath(os.path.join(os.path.dirname(filename), relative_modelpath)) + self.modelpath = os.path.realpath(os.path.join(os.path.dirname(filename), modelpath)) self.filename = filename else: - self.modelpath = relative_modelpath + self.modelpath = modelpath diff --git a/wetb/hawc2/simulation.py b/wetb/hawc2/simulation.py index 8e96c0483b03abed505b78c81ddb231b5d8ae970..eca748c5f7f73c1acf79ec881f64675ea92a1b22 100755 --- a/wetb/hawc2/simulation.py +++ b/wetb/hawc2/simulation.py @@ -339,9 +339,10 @@ class Simulation(object): except: print ("finish_simulation failed", str(self)) raise - except: + except Exception as e: self.status = ERROR - raise + self.errors.append(str(e)) + raise e finally: self.is_done = True diff --git a/wetb/utils/cluster_tools/ssh_client.py b/wetb/utils/cluster_tools/ssh_client.py index bd5450dc29efe175eed049422e73d52dc5442e99..39d2f7c81fc5ebcc0dcb14f3b5b60f4873c79cf0 100644 --- a/wetb/utils/cluster_tools/ssh_client.py +++ b/wetb/utils/cluster_tools/ssh_client.py @@ -51,7 +51,7 @@ class SSHClient(object): def connect(self): if self.password is None or self.password == "": - raise IOError("Password not set") + raise IOError("Password not set for %s"%self.host) self.client = paramiko.SSHClient() self.client.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.client.connect(self.host, self.port, username=self.username, password=self.password, pkey=self.key, timeout=self.TIMEOUT)