Update script files to support python3 36/287836/2
authorSunggyu Choi <sunggyu.choi@samsung.com>
Tue, 7 Feb 2023 04:44:39 +0000 (13:44 +0900)
committerSunggyu Choi <sunggyu.choi@samsung.com>
Tue, 7 Feb 2023 04:47:43 +0000 (13:47 +0900)
Change-Id: I0277cfb691deedc904083f17c8c295fd93c4af8c
Signed-off-by: Sunggyu Choi <sunggyu.choi@samsung.com>
tool/find_differences.py
tool/make_msg_header.py

index 0092d3a..58f2d4b 100755 (executable)
@@ -4,7 +4,7 @@
 import sys
 
 def usage():
-       print "Usage: find_differences.py OLD_FILE NEW_FILE"
+       print( "Usage: find_differences.py OLD_FILE NEW_FILE" )
 
 
 
@@ -22,18 +22,18 @@ def main():
        file2.close()
 
        removed = lines1 - lines2
-       print "\n"
-       print ">>>> Removed"
+       print( "\n" )
+       print( ">>>> Removed" )
        for i in removed:
                print("%s\n" %i)
 
        added = lines2 - lines1
-       print "\n"
-       print ">>>> Added"
+       print( "\n")
+       print( ">>>> Added" )
        for i in added:
-               print("%s\n" %i)
+               print( "%s\n" %i )
 
 
 
 if __name__ == '__main__':
-       main()
\ No newline at end of file
+       main()
index 13c58fa..a374115 100755 (executable)
@@ -28,17 +28,17 @@ fp.write( "} err_info;\n\n" )
 fp.write( "static err_info err_list[] = {\n" );
 for root, dirs, files in os.walk( msgpath ):
        for file in files:
-               print ">>>> " + file
+               print( ">>>> " + file )
                targetXML = open( os.path.join( msgpath, file ) )
                tree = parse( targetXML )
-               errorroot = tree.getroot()              
+               errorroot = tree.getroot()
 
                for error in errorroot.findall( "error" ):
                        fp.write( "\tERR_ENTRY(\"" )
                        fp.write( error.get( "name" ) + "\", ")
                        fp.write( error.findtext( "value" ) + ", \"" )
                        fp.write( error.findtext( "msg" ) + "\"),\n" )
-                       print error.get( "name" )
+                       print( error.get( "name" ) )
 
 fp.write( "\t{0, NULL, NULL}\n" )
 fp.write( "};\n" )
@@ -54,4 +54,4 @@ if not os.path.isdir( privatepath ):
        os.mkdir( privatepath )
 
 # os.remove( privatepath + "tizen_error_private.h" )
-# shutil.move( headerpath, privatepath )
\ No newline at end of file
+# shutil.move( headerpath, privatepath )