Skip to content

Commit 350cb5f

Browse files
authored
Use st_size in emrun.py rather than constant (#18681)
This seems to date back to the initial commit but I can't see any reason to use the constant here. I tested in both python2 and python3 that these are the same thing.
1 parent ccfd4da commit 350cb5f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

emrun.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ def send_head(self):
650650
ctype = 'application/javascript'
651651
self.send_header('Content-type', ctype)
652652
fs = os.fstat(f.fileno())
653-
self.send_header("Content-Length", str(fs[6]))
653+
self.send_header("Content-Length", str(fs.st_size))
654654
self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
655655
self.send_header('Cache-Control', 'no-cache, must-revalidate')
656656
self.send_header('Connection', 'close')

0 commit comments

Comments
 (0)