launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #23415
[Merge] lp:~cjwatson/launchpad/ppa-generate-keys-logging into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/ppa-generate-keys-logging into lp:launchpad.
Commit message:
Log archive references in PPAKeyGenerator.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/ppa-generate-keys-logging/+merge/364439
This just makes logs a bit easier to grep.
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/ppa-generate-keys-logging into lp:launchpad.
=== modified file 'lib/lp/soyuz/scripts/ppakeygenerator.py'
--- lib/lp/soyuz/scripts/ppakeygenerator.py 2018-12-04 15:02:56 +0000
+++ lib/lp/soyuz/scripts/ppakeygenerator.py 2019-03-14 12:50:23 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
__all__ = [
@@ -30,7 +30,8 @@
def generateKey(self, archive):
"""Generate a signing key for the given archive."""
self.logger.info(
- "Generating signing key for %s" % archive.displayname)
+ "Generating signing key for %s (%s)" %
+ (archive.reference, archive.displayname))
archive_signing_key = IArchiveSigningKey(archive)
archive_signing_key.generateSigningKey()
self.logger.info("Key %s" % archive.signing_key.fingerprint)
@@ -46,8 +47,9 @@
% self.options.archive)
if archive.signing_key is not None:
raise LaunchpadScriptFailure(
- "%s already has a signing_key (%s)"
- % (archive.displayname, archive.signing_key.fingerprint))
+ "%s (%s) already has a signing_key (%s)"
+ % (archive.reference, archive.displayname,
+ archive.signing_key.fingerprint))
archives = [archive]
else:
archive_set = getUtility(IArchiveSet)
=== modified file 'lib/lp/soyuz/scripts/tests/test_ppakeygenerator.py'
--- lib/lp/soyuz/scripts/tests/test_ppakeygenerator.py 2018-01-02 16:10:26 +0000
+++ lib/lp/soyuz/scripts/tests/test_ppakeygenerator.py 2019-03-14 12:50:23 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2015 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2019 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""`PPAKeyGenerator` script class tests."""
@@ -81,7 +81,8 @@
archive_reference='~cprov/ubuntu/ppa')
self.assertRaisesWithContent(
LaunchpadScriptFailure,
- ("PPA for Celso Providelo already has a signing_key (%s)" %
+ ("~cprov/ubuntu/ppa (PPA for Celso Providelo) already has a "
+ "signing_key (%s)" %
cprov.archive.signing_key.fingerprint),
key_generator.main)
Follow ups