]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/Python/AutoGen/AutoGen.py
BaseTools: Refactor python print statements
[mirror_edk2.git] / BaseTools / Source / Python / AutoGen / AutoGen.py
index 72d801df8fd5d1bfd03835298e9b475f5b085f8d..e268c4c0a1cfa41bb298196cec4aa2a308960f92 100644 (file)
@@ -15,6 +15,7 @@
 \r
 ## Import Modules\r
 #\r
+from __future__ import print_function\r
 import Common.LongFilePathOs as os\r
 import re\r
 import os.path as path\r
@@ -688,7 +689,7 @@ class WorkspaceAutoGen(AutoGen):
             os.makedirs(self.BuildDir)\r
         with open(os.path.join(self.BuildDir, 'AutoGen'), 'w+') as file:\r
             for f in AllWorkSpaceMetaFiles:\r
-                print >> file, f\r
+                print(f, file=file)\r
         return True\r
 \r
     def _GenPkgLevelHash(self, Pkg):\r
@@ -4362,7 +4363,7 @@ class ModuleAutoGen(AutoGen):
             os.remove (self.GetTimeStampPath())\r
         with open(self.GetTimeStampPath(), 'w+') as file:\r
             for f in FileSet:\r
-                print >> file, f\r
+                print(f, file=file)\r
 \r
     Module          = property(_GetModule)\r
     Name            = property(_GetBaseName)\r