Пример #1
0
 def store_path(self, artifact, path, name=None, checksum=False, max_objects=None):
     url = urlparse(path)
     if name is None:
         raise ValueError('You must pass name="<entry_name>" when tracking references with unknown schemes. ref: %s' % path)
     termwarn('Artifact references with unsupported schemes cannot be checksummed: %s' % path)
     name = name or url.path[1:]  # strip leading slash
     return [ArtifactManifestEntry(name, path, digest=path)]
Пример #2
0
    def items(self, section=None):
        section = section if section is not None else Settings.DEFAULT_SECTION

        result = {'section': section}

        try:
            if section in self._global_settings.sections():
                for option in self._global_settings.options(section):
                    result[option] = self._global_settings.get(section, option)
            if section in self._local_settings.sections():
                for option in self._local_settings.options(section):
                    result[option] = self._local_settings.get(section, option)
        except configparser.InterpolationSyntaxError:
            core.termwarn("Unable to parse settings file")

        return result