def _get_log_path(): path = project.setting('profile', 'profile_log_path') if not path: prj_path = project.project_directory() path = os.path.join(prj_path, 'data') path = os.path.join(path, 'profile') if not os.path.exists(path): os.makedirs(path) logging.debug('Profile store path: %s' % path) return path
def _prepare_dir(self): url_re = re.compile(r"dir://(.*)") match = url_re.match(self.storage_url) _path = match.groups()[0] if not os.path.exists(_path): _path = project.project_directory() self.path = os.path.join(_path, 'data') self.path = os.path.join(self.path, 'cache') if not os.path.exists(self.path): os.makedirs(self.path) logging.debug('Cache store path: %s' % self.path)