File tree Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Expand file tree Collapse file tree 1 file changed +9
-16
lines changed Original file line number Diff line number Diff line change @@ -3529,31 +3529,24 @@ pystatx_result_repr(PyObject *op)
35293529        Py_DECREF (o );
35303530    }
35313531
3532-     if  (Py_ARRAY_LENGTH (pystatx_result_members ) >  1 
3533-         &&  Py_ARRAY_LENGTH (pystatx_result_getset ) >  1 ) {
3534-         WRITE_ASCII (", " );
3535-     }
3536- 
35373532    for  (size_t  i  =  0 ; i  <  Py_ARRAY_LENGTH (pystatx_result_getset ) -  1 ; ++ i ) {
35383533        PyGetSetDef  * d  =  & pystatx_result_getset [i ];
35393534        PyObject  * o  =  d -> get (op , d -> closure );
35403535        if  (o  ==  NULL ) {
35413536            goto error ;
35423537        }
3538+         if  (o  ==  Py_None ) {
3539+             continue ;
3540+         }
35433541
3544-         if  (o  !=  Py_None ) {
3545-             if  (i  >  0 ) {
3546-                 WRITE_ASCII (", " );
3547-             }
3548- 
3549-             WRITE_ASCII (d -> name );
3550-             WRITE_ASCII ("=" );
3551-             if  (PyUnicodeWriter_WriteRepr (writer , o ) <  0 ) {
3552-                 Py_DECREF (o );
3553-                 goto error ;
3554-             }
3542+         WRITE_ASCII (", " );
3543+         WRITE_ASCII (d -> name );
3544+         WRITE_ASCII ("=" );
3545+         if  (PyUnicodeWriter_WriteRepr (writer , o ) <  0 ) {
35553546            Py_DECREF (o );
3547+             goto error ;
35563548        }
3549+         Py_DECREF (o );
35573550    }
35583551
35593552    WRITE_ASCII (")" );
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments