Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit ebf80343 authored by matograine's avatar matograine
Browse files

* add a check for pages number

parent 8046d324
......@@ -7,7 +7,7 @@ from utils.generator import Generator
from utils.transfer import Transfer
from utils.constants import DEFAULT_FOLDER, WALLETS_FOLDER, BACKUP_FOLDER, CONF_FILE, MAX_PAGES
from utils.utils import CheckConfig, check_date
from utils.silkaj.tools import coroutine
from utils.silkaj.tools import coroutine, message_exit
from utils.silkaj.auth import auth_by_scrypt
from duniterpy.key import SigningKey, ascii_armor
......@@ -17,6 +17,8 @@ class Creating:
"""Generating, filling wallets"""
def __init__(self, amount, given_date, pages=1): # Pour les tests, sur 15 min par defaut.
if pages > MAX_PAGES:
message_exit("Erreur : Ğ1Don gère un maximum de 10 pages.")
self.pages = pages
self.amount = amount
conf = CheckConfig()
......@@ -44,7 +46,7 @@ class Creating:
self.save_json()
if self.amount > 0:
transfer.transfer(self.key)
def save_json(self): #, key):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment