Exemplo n.º 1
0
 def validate(self, product, whitelistedDomains):
     Blob.validate(self, product, whitelistedDomains)
     for vendor in self["vendors"]:
         for platform in self["vendors"][vendor].get("platforms", {}).values():
             if "hashValue" in platform:
                 actualLen = len(platform["hashValue"])
                 requiredLen = getHashLen(self["hashFunction"])
                 if actualLen != requiredLen:
                     raise ValueError("The hashValue length is different from the required length of {} for {}."
                                      .format(getHashLen(self["hashFunction"]), self["hashFunction"].lower()))
Exemplo n.º 2
0
 def validate(self, product, whitelistedDomains):
     Blob.validate(self, product, whitelistedDomains)
     for vendor in self["vendors"]:
         for platform in self["vendors"][vendor].get("platforms", {}).values():
             if "hashValue" in platform:
                 actualLen = len(platform["hashValue"])
                 requiredLen = getHashLen(self["hashFunction"])
                 if actualLen != requiredLen:
                     raise ValueError(
                         "The hashValue length is different from the required length of {} for {}.".format(
                             getHashLen(self["hashFunction"]), self["hashFunction"].lower()
                         )
                     )
Exemplo n.º 3
0
 def __init__(self, **kwargs):
     Blob.__init__(self, **kwargs)
     if "schema_version" not in self:
         self["schema_version"] = 4000
Exemplo n.º 4
0
 def __init__(self, **kwargs):
     # ensure schema_version is set if we init DesupportBlob directly
     Blob.__init__(self, **kwargs)
     if 'schema_version' not in self.keys():
         self['schema_version'] = 50
Exemplo n.º 5
0
 def __init__(self, **kwargs):
     # ensure schema_version is set if we init ReleaseBlobV6 directly
     Blob.__init__(self, **kwargs)
     if 'schema_version' not in self.keys():
         self['schema_version'] = 7
Exemplo n.º 6
0
 def __init__(self, **kwargs):
     Blob.__init__(self, **kwargs)
Exemplo n.º 7
0
Arquivo: gmp.py Projeto: nurav/balrog
 def __init__(self, **kwargs):
     Blob.__init__(self, **kwargs)
     if "schema_version" not in self:
         self["schema_version"] = 1000
Exemplo n.º 8
0
 def __init__(self, **kwargs):
     Blob.__init__(self, **kwargs)
Exemplo n.º 9
0
 def __init__(self, **kwargs):
     # ensure schema_version is set if we init DesupportBlob directly
     Blob.__init__(self, **kwargs)
     if 'schema_version' not in self.keys():
         self['schema_version'] = 50
Exemplo n.º 10
0
 def __init__(self, **kwargs):
     # ensure schema_version is set if we init ReleaseBlobV5 directly
     Blob.__init__(self, **kwargs)
     if 'schema_version' not in self.keys():
         self['schema_version'] = 5