Exemple #1
0
 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
Exemple #2
0
 def pgreen(self, text):
     return echo_plain_green(text)