[8.0]update for subscription based fintech licensing

This commit is contained in:
Luc De Meyer
2020-12-03 20:45:22 +01:00
parent e8a538bf22
commit 4ee049ce98
3 changed files with 11 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2009-2018 Noviat.
# Copyright 2009-2020 Noviat.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
@@ -22,13 +22,16 @@ fintech_register_users = config.get('fintech_register_users')
try:
if fintech:
fintech_register_users = fintech_register_users \
fintech_register_users = (
fintech_register_users
and [x.strip() for x in fintech_register_users.split(',')]
or None
)
fintech.cryptolib = 'cryptography'
fintech.register(
fintech_register_name,
fintech_register_keycode,
fintech_register_users)
name=fintech_register_name,
keycode=fintech_register_keycode,
users=fintech_register_users)
except RuntimeError, e:
if e.message == "'register' can be called only once":
pass