python3: cpu-reformat: Use the print() function
Replace the print statement, that is only available in Py2, with a print function that is available in both Py2 and Py3 and drop the explicit python version in the shebang. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
This commit is contained in:
parent
ddfc6db2f5
commit
d65f487a91
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env python2
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import json
|
import json
|
||||||
@ -6,4 +6,4 @@ import json
|
|||||||
dec = json.JSONDecoder()
|
dec = json.JSONDecoder()
|
||||||
data, pos = dec.raw_decode(sys.stdin.read())
|
data, pos = dec.raw_decode(sys.stdin.read())
|
||||||
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
|
json.dump(data, sys.stdout, indent=2, separators=(',', ': '))
|
||||||
print
|
print("\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user