提交 ba5e6fde 编写于 作者: M Mark Hymers

make binary class store rejects

Signed-off-by: NMark Hymers <mhy@debian.org>
上级 1518cb08
......@@ -72,6 +72,8 @@ class Binary(object):
self.tmpdir = None
self.chunks = None
self.wrapped_reject = reject
# Store rejects for later use
self.rejects = []
def reject(self, message):
"""
......@@ -79,6 +81,7 @@ class Binary(object):
otherwise send it to stderr.
"""
print >> sys.stderr, message
self.rejects.append(message)
if self.wrapped_reject:
self.wrapped_reject(message)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册