1
0
mirror of https://github.com/laurivosandi/certidude synced 2024-12-23 00:25:18 +00:00

py3k: Use print()

This commit is contained in:
Priit Laes 2017-10-01 00:26:53 +03:00
parent ad78ebc335
commit 3b6c79a296

View File

@ -1128,9 +1128,9 @@ def certidude_users():
from certidude.user import User
admins = set(User.objects.filter_admins())
for user in User.objects.all():
print "%s;%s;%s;%s;%s" % (
print ("%s;%s;%s;%s;%s" % (
"admin" if user in admins else "user",
user.name, user.given_name, user.surname, user.mail)
user.name, user.given_name, user.surname, user.mail))
@click.command("list", help="List certificates")
@ -1200,7 +1200,7 @@ def certidude_list(verbose, show_key_type, show_extensions, show_path, show_sign
click.echo("openssl x509 -in %s -text -noout" % path)
dump_common(common_name, path, cert)
for ext in cert["tbs_certificate"]["extensions"]:
print " - %s: %s" % (ext["extn_id"].native, repr(ext["extn_value"].native))
print (" - %s: %s" % (ext["extn_id"].native, repr(ext["extn_value"].native)))
if show_revoked:
for common_name, path, buf, cert, server in authority.list_revoked():
@ -1217,7 +1217,7 @@ def certidude_list(verbose, show_key_type, show_extensions, show_path, show_sign
click.echo("openssl x509 -in %s -text -noout" % path)
dump_common(common_name, path, cert)
for ext in cert["tbs_certificate"]["extensions"]:
print " - %s: %s" % (ext["extn_id"].native, repr(ext["extn_value"].native))
print (" - %s: %s" % (ext["extn_id"].native, repr(ext["extn_value"].native)))
@click.command("sign", help="Sign certificate")