File tree 1 file changed +9
-9
lines changed
1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 12
12
13
13
if len (sys .argv ) != 5 :
14
14
print ("usage: specialize_node_d.py outfile src/node.d flavor arch" )
15
- sys .exit (2 );
15
+ sys .exit (2 )
16
16
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 ]
21
21
22
22
model = r'curpsinfo->pr_dmodel == PR_MODEL_ILP32'
23
23
24
24
for line in infile :
25
25
if flavor == 'freebsd' :
26
- line = re .sub ('procfs.d' , 'psinfo.d' , line );
26
+ line = re .sub ('procfs.d' , 'psinfo.d' , line )
27
27
if arch == 'x64' :
28
- line = re .sub (model , '0' , line );
28
+ line = re .sub (model , '0' , line )
29
29
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