summaryrefslogtreecommitdiffstats
path: root/ipapython/dnssec/localhsm.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-08-12 13:44:11 +0200
committerJan Cholasta <jcholast@redhat.com>2015-09-01 11:42:01 +0200
commit8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e (patch)
treeac6435b79d3e540e907bcc88e3b1c534c2945626 /ipapython/dnssec/localhsm.py
parentfb7943dab454f358316160b4baf99075603a162d (diff)
downloadfreeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.gz
freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.tar.xz
freeipa-8de13bd7dd76f5f5b23d6e4fb84be1a2f1dc5c5e.zip
Use the print function
In Python 3, `print` is no longer a statement. Call it as a function everywhere, and include the future import to remove the statement in Python 2 code as well. Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Jan Cholasta <jcholast@redhat.com>
Diffstat (limited to 'ipapython/dnssec/localhsm.py')
-rwxr-xr-xipapython/dnssec/localhsm.py40
1 files changed, 21 insertions, 19 deletions
diff --git a/ipapython/dnssec/localhsm.py b/ipapython/dnssec/localhsm.py
index d3b4ae15c..2eab5c351 100755
--- a/ipapython/dnssec/localhsm.py
+++ b/ipapython/dnssec/localhsm.py
@@ -3,6 +3,8 @@
# Copyright (C) 2014 FreeIPA Contributors see COPYING for license
#
+from __future__ import print_function
+
from binascii import hexlify
import collections
import logging
@@ -192,36 +194,36 @@ if __name__ == '__main__':
localhsm = LocalHSM(paths.LIBSOFTHSM2_SO, 0,
open(paths.DNSSEC_SOFTHSM_PIN).read())
- print 'replica public keys: CKA_WRAP = TRUE'
- print '===================================='
+ print('replica public keys: CKA_WRAP = TRUE')
+ print('====================================')
for pubkey_id, pubkey in localhsm.replica_pubkeys_wrap.items():
- print hexlify(pubkey_id)
+ print(hexlify(pubkey_id))
pprint(pubkey)
- print ''
- print 'replica public keys: all'
- print '========================'
+ print('')
+ print('replica public keys: all')
+ print('========================')
for pubkey_id, pubkey in localhsm.replica_pubkeys.items():
- print hexlify(pubkey_id)
+ print(hexlify(pubkey_id))
pprint(pubkey)
- print ''
- print 'master keys'
- print '==========='
+ print('')
+ print('master keys')
+ print('===========')
for mkey_id, mkey in localhsm.master_keys.items():
- print hexlify(mkey_id)
+ print(hexlify(mkey_id))
pprint(mkey)
- print ''
- print 'zone public keys'
- print '================'
+ print('')
+ print('zone public keys')
+ print('================')
for key_id, key in localhsm.zone_pubkeys.items():
- print hexlify(key_id)
+ print(hexlify(key_id))
pprint(key)
- print ''
- print 'zone private keys'
- print '================='
+ print('')
+ print('zone private keys')
+ print('=================')
for key_id, key in localhsm.zone_privkeys.items():
- print hexlify(key_id)
+ print(hexlify(key_id))
pprint(key)