pu.program = "process-upload"
+ pu.warnings = upload.warnings
+
return pu
@try_or_reject
# program
program = "unknown-program"
+ warnings = []
+
def _subst_for_upload(upload):
cnf = Config()
'__SOURCE__': upload.source,
'__VERSION__': upload.version,
'__ARCHITECTURE__': upload.architecture,
+ '__WARNINGS__': '\n'.join(upload.warnings),
}
override_maintainer = cnf.get('Dinstall::OverrideMaintainer')
self._new_queue = self.session.query(PolicyQueue).filter_by(queue_name='new').one()
self._new = self._new_queue.suite
+ def warn(self, message):
+ """add a warning message
+
+ Adds a warning message that can later be seen in C{self.warnings}
+
+ @type message: string
+ @param message: warning message
+ """
+ self.warnings.append(message)
+
def prepare(self):
"""prepare upload for further processing
Content-Transfer-Encoding: 8bit
Subject: __CHANGES_FILENAME__ ACCEPTED into __SUITE__
+__WARNINGS__
+
Accepted:
+
__FILE_CONTENTS__
Thank you for your contribution to __DISTRO__.