vcp/project_handler_base.py
def load(self):
        """Load the projects config data from local path

        Returns:
            Dict: project_name -> project_data
        """
        projects = {}

        path = os.path.expanduser(self.path)

        if not os.path.isdir(path):
            return projects

        logger.debug("Load project configs from %s", path)

        for filename in os.listdir(path):
            filename_parts = os.path.splitext(filename)

            if filename_parts[1][1:] != PROJECT_CONFIG_EXTENSION:
                continue
            name = filename_parts[0]

            try:
                project_file_path = os.path.join(path, filename)
                with open(project_file_path) as f:
                    data = yaml.load(f)
                projects[name] = data
            except ValueError:
                continue

            logger.debug("Project '{}' config readed from {}".format(name, project_file_path))

        return projects
def load(self):
        projects = {}

        path = os.path.expanduser(self.path)

        if not os.path.isdir(path):
            return projects

        logger.debug("Load project configs from %s", path)

        for filename in os.listdir(path):
            filename_parts = os.path.splitext(filename)

            if filename_parts[1][1:] != PROJECT_CONFIG_EXTENSION:
                continue
            name = filename_parts[0]

            try:
                project_file_path = os.path.join(path, filename)
                with open(project_file_path) as f:
                    data = yaml.load(f)
                projects[name] = data
            except ValueError:
                continue

            logger.debug("Project '{}' config readed from {}".format(name, project_file_path))

        return projects
def load ( self ) : projects = { } path = os . path . expanduser ( self . path ) if not os . path . isdir ( path ) : return projects logger . debug ( "Load project configs from %s" , path ) for filename in os . listdir ( path ) : filename_parts = os . path . splitext ( filename ) if filename_parts [ 1 ] [ 1 : ] != PROJECT_CONFIG_EXTENSION : continue name = filename_parts [ 0 ] try : project_file_path = os . path . join ( path , filename ) with open ( project_file_path ) as f : data = yaml . load ( f ) projects [ name ] = data except ValueError : continue logger . debug ( "Project '{}' config readed from {}" . format ( name , project_file_path ) ) return projects
Load the projects config data from local path

        Returns:
            Dict: project_name -> project_data
Load the projects config data from local path