def get_artifact_metadata(self, package_name):
        """
        Return metadata of the artifacts built through this registry.
        """

        filename = self.metadata.get(package_name)
        if not filename or not exists(filename):
            return {}
        with open(filename, encoding='utf8') as fd:
            contents = fd.read()

        try:
            is_json_compat(contents)
        except ValueError:
            logger.info("artifact metadata file '%s' is invalid", filename)
            return {}

        return json.loads(contents)
def get_artifact_metadata ( self , package_name ) : filename = self . metadata . get ( package_name ) if not filename or not exists ( filename ) : return { } with open ( filename , encoding = 'utf8' ) as fd : contents = fd . read ( ) try : is_json_compat ( contents ) except ValueError : logger . info ( "artifact metadata file '%s' is invalid" , filename ) return { } return json . loads ( contents )
Return metadata of the artifacts built through this registry.