Delete bad manifests from the DB
This commit is contained in:
parent
babf61fdaa
commit
6e05920d6b
2 changed files with 56 additions and 2 deletions
|
@ -63,7 +63,7 @@ _SCHEMA_VER = 'schemaVersion'
|
|||
|
||||
class SignedManifest(object):
|
||||
|
||||
def __init__(self, manifest_bytes):
|
||||
def __init__(self, manifest_bytes, validate=True):
|
||||
self._bytes = manifest_bytes
|
||||
|
||||
self._parsed = json.loads(manifest_bytes)
|
||||
|
@ -79,7 +79,8 @@ class SignedManifest(object):
|
|||
else:
|
||||
raise ValueError('repo_name has too many or too few pieces')
|
||||
|
||||
self._validate()
|
||||
if validate:
|
||||
self._validate()
|
||||
|
||||
def _validate(self):
|
||||
for signature in self._signatures:
|
||||
|
|
Reference in a new issue