def find_project(self, name, project=None, ignore_project=True): self.project = project append = settings.get('append') if project and append.get(project): self.dirname = self.join( self.absuser(append.get(project)), name ) echo_plain_green(texts.LOG_PROFILE_PROJECT_FOUND.format(project)) return self.dirname = self.absjoin( settings.get('path'), name ) if not ignore_project or self.isdir(self.dirname): return for project, path in append.items(): if not path: continue abspath = self.absuser(path) if self.isdir(abspath): dirname = self.join(abspath, name) if self.isdir(dirname): self.project = project self.dirname = dirname echo_plain_green( texts.LOG_PROFILE_PROJECT_FOUND.format(project)) break
def pgreen(self, text): return echo_plain_green(text)