mirror of
https://github.com/HelloZeroNet/ZeroNet.git
synced 2023-12-14 04:33:03 +01:00
Display exact sign error to UI on failure
This commit is contained in:
parent
43c8dacd70
commit
79ca1069ec
1 changed files with 5 additions and 4 deletions
|
@ -377,10 +377,11 @@ class UiWebsocket(object):
|
|||
# Reload content.json, ignore errors to make it up-to-date
|
||||
site.content_manager.loadContent(inner_path, add_bad_files=False, force=True)
|
||||
# Sign using private key sent by user
|
||||
signed = site.content_manager.sign(inner_path, privatekey, extend=extend, update_changed_files=update_changed_files, remove_missing_optional=remove_missing_optional)
|
||||
if not signed:
|
||||
self.cmd("notification", ["error", _["Content signing failed"]])
|
||||
self.response(to, {"error": "Site sign failed"})
|
||||
try:
|
||||
signed = site.content_manager.sign(inner_path, privatekey, extend=extend, update_changed_files=update_changed_files, remove_missing_optional=remove_missing_optional)
|
||||
except Exception, err:
|
||||
self.cmd("notification", ["error", _["Content signing failed"] + "<br><small>%s</small>" % err])
|
||||
self.response(to, {"error": "Site sign failed: %s" % err})
|
||||
return
|
||||
|
||||
site.content_manager.loadContent(inner_path, add_bad_files=False) # Load new content.json, ignore errors
|
||||
|
|
Loading…
Reference in a new issue