BlockPolicy: Replace print with logger.info

Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2019-01-07 21:05:42 +00:00
parent 2fea931da3
commit c4371b9f58
No known key found for this signature in database
GPG Key ID: A65B78DBE67C7AAC

View File

@ -957,7 +957,7 @@ class BlockPolicy(BasePolicy):
blocked['block'] = self._blockall['source'].user blocked['block'] = self._blockall['source'].user
excuse.add_hint(self._blockall['source']) excuse.add_hint(self._blockall['source'])
elif 'new-source' in self._blockall and \ elif 'new-source' in self._blockall and \
src not in self.suite_info.target_suite.sources: src not in self.suite_info.target_suite.sources:
blocked['block'] = self._blockall['new-source'].user blocked['block'] = self._blockall['new-source'].user
excuse.add_hint(self._blockall['new-source']) excuse.add_hint(self._blockall['new-source'])
else: else:
@ -972,11 +972,10 @@ class BlockPolicy(BasePolicy):
if m: if m:
if m.group(1) == 'un': if m.group(1) == 'un':
if hint.version != version or hint.suite.name != suite_name or \ if hint.version != version or hint.suite.name != suite_name or \
(hint.architecture != arch and hint.architecture != 'source'): (hint.architecture != arch and hint.architecture != 'source'):
print('hint mismatch: %s %s %s' % (version, arch, suite_name)) self.logger.info('hint mismatch: %s %s %s', version, arch, suite_name)
mismatches = True mismatches = True
else: else:
print('hint match')
unblocked[m.group(2)] = hint.user unblocked[m.group(2)] = hint.user
excuse.add_hint(hint) excuse.add_hint(hint)
else: else:
@ -1009,7 +1008,6 @@ class BlockPolicy(BasePolicy):
verdict = PolicyVerdict.REJECTED_NEEDS_APPROVAL verdict = PolicyVerdict.REJECTED_NEEDS_APPROVAL
return verdict return verdict
def apply_src_policy_impl(self, block_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse): def apply_src_policy_impl(self, block_info, suite, source_name, source_data_tdist, source_data_srcdist, excuse):
return self._check_blocked(source_name, "source", source_data_srcdist.version, suite, excuse) return self._check_blocked(source_name, "source", source_data_srcdist.version, suite, excuse)