Use print() function in both Python 2 and Python 3

This commit is contained in:
cclauss
2020-01-28 01:38:54 +01:00
parent aba31e2187
commit 3208a74f90
13 changed files with 66 additions and 56 deletions
+7 -7
View File
@@ -101,7 +101,7 @@ def parse_cipher(ciph):
fwsec, = m.groups()
return Ciphersuite(ciph, fwsec, "CHACHA20", "256", "POLY1305", "n/a")
print "/* Couldn't parse %s ! */"%ciph
print("/* Couldn't parse %s ! */"%ciph)
return None
@@ -125,12 +125,12 @@ for c in ALL_CIPHERS:
colon = ' ":"'
if c.name in MANDATORY:
print "%s/* Required */"%indent
print '%s%s%s'%(indent,c.name,colon)
print("%s/* Required */"%indent)
print('%s%s%s'%(indent,c.name,colon))
else:
print "#ifdef %s"%c.name
print '%s%s%s'%(indent,c.name,colon)
print "#endif"
print("#ifdef %s"%c.name)
print('%s%s%s'%(indent,c.name,colon))
print("#endif")
print '%s;'%indent
print('%s;'%indent)