mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
fix: use print() function in both Python 2 and Python 3 (#18395)
Legacy print statements are syntax errors in Python 3 but print() function works as expected in both Python 2 and Python 3. Old style exceptions are syntax errors in Python 3 but new style exceptions work as expected in both Python 2 and Python 3.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/env python
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -41,7 +42,7 @@ def execute(argv):
|
||||
output = subprocess.check_output(argv, stderr=subprocess.STDOUT)
|
||||
return output
|
||||
except subprocess.CalledProcessError as e:
|
||||
print e.output
|
||||
print(e.output)
|
||||
raise e
|
||||
|
||||
def main(argv):
|
||||
|
||||
Reference in New Issue
Block a user