提交 584346fc 编写于 作者: A Ansgar Burchardt

Do not load .dsc to check if an upload is sourceful.

This caused an error when rejecting an upload with an invalid .dsc.

We also do not want to load the .dsc before we have made sure it matches the
hash from the .changes.
上级 0fd24759
......@@ -243,7 +243,7 @@ def get_processed_upload(upload):
pu.changes = open(upload.changes.path, 'r').read()
pu.changes_filename = upload.changes.filename
pu.sourceful = upload.changes.source is not None
pu.sourceful = upload.changes.sourceful
pu.source = control.get('Source')
pu.version = control.get('Version')
pu.architecture = control.get('Architecture')
......
......@@ -296,6 +296,13 @@ class Changes(object):
self._source = Source(self.directory, source_files, self._keyrings, self._require_signature)
return self._source
@property
def sourceful(self):
"""C{True} if the upload includes source
@type: bool
"""
return "source" in self.architectures
@property
def source_name(self):
"""source package name
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册