Skip to content

Commit

Permalink
finally fix this spurious warnings which has been there forever
Browse files Browse the repository at this point in the history
  • Loading branch information
antocuni committed Oct 30, 2017
1 parent f4f6ec1 commit 9ccc769
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vmshare/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ def post_file(self, rid, filename, filetype, compress=False):
if 'vmprof.com' in self.host:
# not sure about nginx, what does MB mean? 1MB == 1000 byte or 1024 byte?
# take the lower bound...
megabytes = os.path.getsize(filename) / 1000
if megabytes >= 100:
size = os.path.getsize(filename)
if size >= 100*1000*1000: # 100 MB
warnings.warn("WARNING: vmprof.com limits the "
"compressed profile file to 100 MBs. "
"The upload might fail!\n")
Expand Down

0 comments on commit 9ccc769

Please sign in to comment.