def __init__(self, submitdir, raise_err=True): self.submitdir = os.path.abspath(submitdir) self.submitdir_exists = True if not os.path.isdir(submitdir): self.submitdir_exists = False if raise_err is False: return raise SubmitDirException("Invalid submit dir: %s" % submitdir) # Locate braindump file self.braindump_file = os.path.join(self.submitdir, "braindump.txt") if not os.path.isfile(self.braindump_file): raise SubmitDirException("Not a submit directory: braindump.txt missing") # Read the braindump file self.braindump = utils.read_braindump(self.braindump_file) # Read some attributes from braindump file self.wf_uuid = self.braindump["wf_uuid"] self.root_wf_uuid = self.braindump["root_wf_uuid"] self.user = self.braindump["user"] self.archname = os.path.join(self.submitdir, "archive.tar.gz")
def __init__(self, submitdir): if not os.path.isdir(submitdir): raise SubmitDirException("Invalid submit dir: %s" % submitdir) self.submitdir = os.path.abspath(submitdir) # Locate braindump file self.braindump_file = os.path.join(self.submitdir, "braindump.txt") if not os.path.isfile(self.braindump_file): raise SubmitDirException("Not a submit directory: braindump.txt missing") # Read the braindump file self.braindump = utils.read_braindump(self.braindump_file) # Read some attributes from braindump file self.wf_uuid = self.braindump["wf_uuid"] self.root_wf_uuid = self.braindump["root_wf_uuid"] self.user = self.braindump["user"]
def __init__(self, submitdir): if not os.path.isdir(submitdir): raise SubmitDirException("Invalid submit dir: %s" % submitdir) self.submitdir = os.path.abspath(submitdir) # Locate braindump file self.braindump_file = os.path.join(self.submitdir, "braindump.txt") if not os.path.isfile(self.braindump_file): raise SubmitDirException( "Not a submit directory: braindump.txt missing") # Read the braindump file self.braindump = utils.read_braindump(self.braindump_file) # Read some attributes from braindump file self.wf_uuid = self.braindump["wf_uuid"] self.root_wf_uuid = self.braindump["root_wf_uuid"] self.user = self.braindump["user"]