Skip to content

Commit

Permalink
Add unit to verification error
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Jul 13, 2017
1 parent 7d3beeb commit 096675c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Content/ContentManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ def verifyContent(self, inner_path, content):
task = self.site.worker_manager.findTask(inner_path)
if task: # Dont try to download from other peers
self.site.worker_manager.failTask(task)
raise VerifyError("Site too large %s > %s, aborting task..." % (site_size, site_size_limit))
raise VerifyError("Site too large %sB > %sB, aborting task..." % (site_size, site_size_limit))

if inner_path == "content.json":
self.site.settings["size"] = site_size
Expand All @@ -745,11 +745,11 @@ def verifyContent(self, inner_path, content):
# Check include size limit
if rules.get("max_size") is not None: # Include size limit
if content_size > rules["max_size"]:
raise VerifyError("Include too large %s > %s" % (content_size, rules["max_size"]))
raise VerifyError("Include too large %sB > %sB" % (content_size, rules["max_size"]))

if rules.get("max_size_optional") is not None: # Include optional files limit
if content_size_optional > rules["max_size_optional"]:
raise VerifyError("Include optional files too large %s > %s" % (
raise VerifyError("Include optional files too large %sB > %sB" % (
content_size_optional, rules["max_size_optional"])
)

Expand Down

0 comments on commit 096675c

Please sign in to comment.