File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ def abspath(*args):
1919  return  os .path .abspath (path )
2020
2121def  load_config ():
22-   s   =   open ('config.gypi' ). read () 
23-   return  ast .literal_eval (s )
22+   with   open ('config.gypi' )  as   f : 
23+      return  ast .literal_eval (f . read () )
2424
2525def  try_unlink (path ):
2626  try :
@@ -223,11 +223,19 @@ def run(args):
223223  cmd  =  args [1 ] if  len (args ) >  1  else  'install' 
224224
225225  if  os .environ .get ('HEADERS_ONLY' ):
226-     if  cmd  ==  'install' : return  headers (install )
227-     if  cmd  ==  'uninstall' : return  headers (uninstall )
226+     if  cmd  ==  'install' :
227+       headers (install )
228+       return 
229+     if  cmd  ==  'uninstall' :
230+       headers (uninstall )
231+       return 
228232  else :
229-     if  cmd  ==  'install' : return  files (install )
230-     if  cmd  ==  'uninstall' : return  files (uninstall )
233+     if  cmd  ==  'install' :
234+       files (install )
235+       return 
236+     if  cmd  ==  'uninstall' :
237+       files (uninstall )
238+       return 
231239
232240  raise  RuntimeError ('Bad command: %s\n '  %  cmd )
233241
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments