Add unit to verification error
This commit is contained in:
parent
7d3beeb9e0
commit
096675c87e
1 changed files with 3 additions and 3 deletions
|
@ -730,7 +730,7 @@ class ContentManager(object):
|
||||||
task = self.site.worker_manager.findTask(inner_path)
|
task = self.site.worker_manager.findTask(inner_path)
|
||||||
if task: # Dont try to download from other peers
|
if task: # Dont try to download from other peers
|
||||||
self.site.worker_manager.failTask(task)
|
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":
|
if inner_path == "content.json":
|
||||||
self.site.settings["size"] = site_size
|
self.site.settings["size"] = site_size
|
||||||
|
@ -745,11 +745,11 @@ class ContentManager(object):
|
||||||
# Check include size limit
|
# Check include size limit
|
||||||
if rules.get("max_size") is not None: # Include size limit
|
if rules.get("max_size") is not None: # Include size limit
|
||||||
if content_size > rules["max_size"]:
|
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 rules.get("max_size_optional") is not None: # Include optional files limit
|
||||||
if content_size_optional > rules["max_size_optional"]:
|
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"])
|
content_size_optional, rules["max_size_optional"])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue