Skip to content

Commit 9ccc769

Browse files
committed
finally fix this spurious warnings which has been there forever
1 parent f4f6ec1 commit 9ccc769

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vmshare/service.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ def post_file(self, rid, filename, filetype, compress=False):
9191
if 'vmprof.com' in self.host:
9292
# not sure about nginx, what does MB mean? 1MB == 1000 byte or 1024 byte?
9393
# take the lower bound...
94-
megabytes = os.path.getsize(filename) / 1000
95-
if megabytes >= 100:
94+
size = os.path.getsize(filename)
95+
if size >= 100*1000*1000: # 100 MB
9696
warnings.warn("WARNING: vmprof.com limits the "
9797
"compressed profile file to 100 MBs. "
9898
"The upload might fail!\n")

0 commit comments

Comments
 (0)