SiteVerify command line action display verify error
This commit is contained in:
parent
b0ee0dae93
commit
7653cba247
1 changed files with 8 additions and 4 deletions
|
@ -240,13 +240,17 @@ class Actions(object):
|
||||||
for content_inner_path in site.content_manager.contents:
|
for content_inner_path in site.content_manager.contents:
|
||||||
s = time.time()
|
s = time.time()
|
||||||
logging.info("Verifing %s signature..." % content_inner_path)
|
logging.info("Verifing %s signature..." % content_inner_path)
|
||||||
|
try:
|
||||||
file_correct = site.content_manager.verifyFile(
|
file_correct = site.content_manager.verifyFile(
|
||||||
content_inner_path, site.storage.open(content_inner_path, "rb"), ignore_same=False
|
content_inner_path, site.storage.open(content_inner_path, "rb"), ignore_same=False
|
||||||
)
|
)
|
||||||
|
except Exception, err:
|
||||||
|
file_correct = False
|
||||||
|
|
||||||
if file_correct is True:
|
if file_correct is True:
|
||||||
logging.info("[OK] %s (Done in %.3fs)" % (content_inner_path, time.time() - s))
|
logging.info("[OK] %s (Done in %.3fs)" % (content_inner_path, time.time() - s))
|
||||||
else:
|
else:
|
||||||
logging.error("[ERROR] %s: invalid file!" % content_inner_path)
|
logging.error("[ERROR] %s: invalid file: %s!" % (content_inner_path, err))
|
||||||
raw_input("Continue?")
|
raw_input("Continue?")
|
||||||
bad_files += content_inner_path
|
bad_files += content_inner_path
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue