BaseTools: Refactor python print statements
Refactor print statements to be compatible with python 3. Based on "futurize -f libfuturize.fixes.fix_print_with_import" Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong.zhu@intel.com> Cc: Liming Gao <liming.gao@intel.com> Signed-off-by: Gary Lin <glin@suse.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import unittest
|
||||
|
||||
@ -66,7 +67,7 @@ def TestTemplate(TestString, TestFunc):
|
||||
# Close file
|
||||
f.close()
|
||||
except:
|
||||
print 'Can not create temporary file [%s]!' % Path
|
||||
print('Can not create temporary file [%s]!' % Path)
|
||||
exit(-1)
|
||||
|
||||
# Call test function to test
|
||||
@ -279,6 +280,6 @@ if __name__ == '__main__':
|
||||
unittest.FunctionTestCase(TestDecPcd).runTest()
|
||||
unittest.FunctionTestCase(TestDecUserExtension).runTest()
|
||||
|
||||
print 'All tests passed...'
|
||||
print('All tests passed...')
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user