fix updater

This commit is contained in:
Kevin Froman 2019-11-16 02:57:49 -06:00
parent 6cc01fa240
commit b4225d3750

View File

@ -18,12 +18,13 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
from onionrtypes import RestartRequiredStatus from onionrtypes import RestartRequiredStatus
from onionrblocks.onionrblockapi import Block from onionrblocks import onionrblockapi
from etc import onionrvalues from etc import onionrvalues
import onionrexceptions import onionrexceptions
import notifier import notifier
def update_event(bl: Block)->RestartRequiredStatus: def update_event(bl)->RestartRequiredStatus:
"""Show update notification if available, return bool of if update happend""" """Show update notification if available, return bool of if update happend"""
if not bl.isSigner(onionrvalues.UPDATE_SIGN_KEY): raise onionrexceptions.InvalidUpdate if not bl.isSigner(onionrvalues.UPDATE_SIGN_KEY): raise onionrexceptions.InvalidUpdate
notifier.notify(message="A new Onionr update is available. Stay updated to remain secure.") notifier.notify(message="A new Onionr update is available. Stay updated to remain secure.")