summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2016-01-14 13:41:14 -0500
committerJason R. Coombs <jaraco@jaraco.com>2016-01-14 13:41:14 -0500
commit15af49d3b04214834b520c90ab43a6f56553b8b2 (patch)
tree34fbbc805c407e73b74639578a44e92eab78d2f2
parentb323f3bd4dee5fc9a52f3e52ff88868fde138c9d (diff)
downloadwheel-15af49d3b04214834b520c90ab43a6f56553b8b2.tar.gz
More simply render keyrings using repr. Planned versions of keyring will move the file-based backends. This technique will be more robust, and updates to keyrings.alt will allow the file path to be included in the repr.
-rw-r--r--wheel/tool/__init__.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/wheel/tool/__init__.py b/wheel/tool/__init__.py
index 6f4abd7..389e619 100644
--- a/wheel/tool/__init__.py
+++ b/wheel/tool/__init__.py
@@ -47,10 +47,7 @@ def keygen(get_keyring=get_keyring):
kr = keyring.get_keyring()
kr.set_password("wheel", vk, sk)
sys.stdout.write("Created Ed25519 keypair with vk={0}\n".format(vk))
- if isinstance(kr, keyring.backends.file.BaseKeyring):
- sys.stdout.write("in {0}\n".format(kr.file_path))
- else:
- sys.stdout.write("in %r\n" % kr.__class__)
+ sys.stdout.write("in {0!r}\n".format(kr))
sk2 = kr.get_password('wheel', vk)
if sk2 != sk: