File tree Expand file tree Collapse file tree
Tools/c-analyzer/distutils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -857,7 +857,7 @@ def send_head(self):
857857
858858 self .send_response (HTTPStatus .OK )
859859 self .send_header ("Content-type" , ctype )
860- self .send_header ("Content-Length" , str (fs [ 6 ] ))
860+ self .send_header ("Content-Length" , str (fs . st_size ))
861861 self .send_header ("Last-Modified" ,
862862 self .date_time_string (fs .st_mtime ))
863863 self ._send_extra_response_headers ()
Original file line number Diff line number Diff line change @@ -1823,8 +1823,8 @@ def test_link_dir_fd(self):
18231823 self .skipTest ('posix.link(): %s' % e )
18241824 self .addCleanup (posix .unlink , fulllinkname )
18251825 # should have same inodes
1826- self .assertEqual (posix .stat (fullname )[ 1 ] ,
1827- posix .stat (fulllinkname )[ 1 ] )
1826+ self .assertEqual (posix .stat (fullname ). st_ino ,
1827+ posix .stat (fulllinkname ). st_ino )
18281828
18291829 @unittest .skipUnless (os .mkdir in os .supports_dir_fd , "test needs dir_fd support in os.mkdir()" )
18301830 def test_mkdir_dir_fd (self ):
Original file line number Diff line number Diff line change @@ -20,9 +20,8 @@ def newer (source, target):
2020 if not os .path .exists (target ):
2121 return 1
2222
23- from stat import ST_MTIME
24- mtime1 = os .stat (source )[ST_MTIME ]
25- mtime2 = os .stat (target )[ST_MTIME ]
23+ mtime1 = os .stat (source ).st_mtime
24+ mtime2 = os .stat (target ).st_mtime
2625
2726 return mtime1 > mtime2
2827
You can’t perform that action at this time.
0 commit comments