ContentManager logging improvements
This commit is contained in:
parent
8e3e96fe65
commit
36b74e1c6a
1 changed files with 5 additions and 4 deletions
|
@ -559,8 +559,9 @@ class ContentManager(object):
|
||||||
if extend:
|
if extend:
|
||||||
# Add extend keys if not exists
|
# Add extend keys if not exists
|
||||||
for key, val in extend.items():
|
for key, val in extend.items():
|
||||||
if key not in content:
|
if not content.get(key):
|
||||||
content[key] = val
|
content[key] = val
|
||||||
|
self.log.info("Extending content.json with: %s" % key)
|
||||||
|
|
||||||
directory = helper.getDirname(self.site.storage.getPath(inner_path))
|
directory = helper.getDirname(self.site.storage.getPath(inner_path))
|
||||||
inner_directory = helper.getDirname(inner_path)
|
inner_directory = helper.getDirname(inner_path)
|
||||||
|
@ -683,7 +684,7 @@ class ContentManager(object):
|
||||||
if not rules.get("cert_signers"):
|
if not rules.get("cert_signers"):
|
||||||
return True # Does not need cert
|
return True # Does not need cert
|
||||||
|
|
||||||
if not "cert_user_id" in content:
|
if "cert_user_id" not in content:
|
||||||
raise VerifyError("Missing cert_user_id")
|
raise VerifyError("Missing cert_user_id")
|
||||||
|
|
||||||
name, domain = content["cert_user_id"].split("@")
|
name, domain = content["cert_user_id"].split("@")
|
||||||
|
@ -733,7 +734,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 %sB > %sB, aborting task..." % (site_size, site_size_limit))
|
raise VerifyError("Content too large %sB > %sB, aborting task..." % (site_size, site_size_limit))
|
||||||
|
|
||||||
# Verify valid filenames
|
# Verify valid filenames
|
||||||
for file_relative_path in content.get("files", {}).keys() + content.get("files_optional", {}).keys():
|
for file_relative_path in content.get("files", {}).keys() + content.get("files_optional", {}).keys():
|
||||||
|
@ -862,7 +863,7 @@ class ContentManager(object):
|
||||||
raise VerifyError("Invalid old-style sign")
|
raise VerifyError("Invalid old-style sign")
|
||||||
|
|
||||||
except Exception, err:
|
except Exception, err:
|
||||||
self.log.warning("Verify sign error: %s" % Debug.formatException(err))
|
self.log.warning("%s: verify sign error: %s" % (inner_path, Debug.formatException(err)))
|
||||||
raise err
|
raise err
|
||||||
|
|
||||||
else: # Check using sha512 hash
|
else: # Check using sha512 hash
|
||||||
|
|
Loading…
Reference in a new issue