Skip to content

Commit a2c86b4

Browse files
author
Leif Johansson
committed
fix more p3 compat in tools
1 parent f444cc2 commit a2c86b4

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

src/xmlsec/tools.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def sign_cmd():
4242
'logfile=',
4343
'reference='])
4444
except getopt.error as msg:
45-
print msg
46-
print __doc__
45+
print(msg)
46+
print(__doc__)
4747
sys.exit(2)
4848

4949
output = None
@@ -55,10 +55,10 @@ def sign_cmd():
5555
do_xinclude = False
5656
for o, a in opts:
5757
if o in ('-h', '--help'):
58-
print __doc__
58+
print(__doc__)
5959
sys.exit(0)
6060
elif o in '--version':
61-
print "sign version %s" % __version__
61+
print("sign version %s" % __version__)
6262
sys.exit(0)
6363
elif o in ('-k','--key'):
6464
keyspec = a
@@ -83,8 +83,8 @@ def sign_cmd():
8383
logging.basicConfig(**log_args)
8484

8585
if keyspec is None:
86-
print "Missing -k|--key argument"
87-
print __doc__
86+
print("Missing -k|--key argument")
87+
print(__doc__)
8888
sys.exit(0)
8989

9090
def _resolve_reference_uri(ref, t): # can probably be improved a bit
@@ -123,8 +123,8 @@ def verify_cmd():
123123
opts, args = getopt.getopt(sys.argv[1:], 'hc:o:r:',
124124
['help', 'cert=', 'version', 'output=', 'loglevel=', 'logfile=', 'reference='])
125125
except getopt.error as msg:
126-
print msg
127-
print __doc__
126+
print(msg)
127+
print(__doc__)
128128
sys.exit(2)
129129

130130
output = None
@@ -134,10 +134,10 @@ def verify_cmd():
134134
logfile = None
135135
for o, a in opts:
136136
if o in ('-h', '--help'):
137-
print __doc__
137+
print(__doc__)
138138
sys.exit(0)
139139
elif o in '--version':
140-
print "sign version %s" % __version__
140+
print("sign version %s" % __version__)
141141
sys.exit(0)
142142
elif o in ('-c','--cert'):
143143
certspec = a

0 commit comments

Comments
 (0)