def __init__(self, output_folder=None): self.clusters = set() self.__unique_id_counters = { 'server':0, 'proxy':0 } if output_folder is None: self.dbs_path = tempfile.mkdtemp() utils.cleanupPathAtExit(self.dbs_path) else: if not os.path.exists(output_folder): os.makedirs(output_folder) if os.path.isdir(output_folder): self.dbs_path = os.path.realpath(output_folder) else: raise ValueError('bad value for output_folder: %s' % str(output_folder))
def __init__(self, output_folder=None): self.clusters = set() self.__unique_id_counters = {"server": 0, "proxy": 0} if output_folder is None: self.dbs_path = tempfile.mkdtemp() utils.cleanupPathAtExit(self.dbs_path) else: if not os.path.exists(output_folder): os.makedirs(output_folder) if os.path.isdir(output_folder): self.dbs_path = os.path.realpath(output_folder) else: raise ValueError("bad value for output_folder: %s" % str(output_folder))