File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 1212
1313if len (sys .argv ) != 5 :
1414 print ("usage: specialize_node_d.py outfile src/node.d flavor arch" )
15- sys .exit (2 );
15+ sys .exit (2 )
1616
17- outfile = file (sys .argv [1 ], 'w' );
18- infile = file (sys .argv [2 ], 'r' );
19- flavor = sys .argv [3 ];
20- arch = sys .argv [4 ];
17+ outfile = open (sys .argv [1 ], 'w' )
18+ infile = open (sys .argv [2 ], 'r' )
19+ flavor = sys .argv [3 ]
20+ arch = sys .argv [4 ]
2121
2222model = r'curpsinfo->pr_dmodel == PR_MODEL_ILP32'
2323
2424for line in infile :
2525 if flavor == 'freebsd' :
26- line = re .sub ('procfs.d' , 'psinfo.d' , line );
26+ line = re .sub ('procfs.d' , 'psinfo.d' , line )
2727 if arch == 'x64' :
28- line = re .sub (model , '0' , line );
28+ line = re .sub (model , '0' , line )
2929 else :
30- line = re .sub (model , '1' , line );
31- outfile .write (line );
30+ line = re .sub (model , '1' , line )
31+ outfile .write (line )
You can’t perform that action at this time.
0 commit comments