ajout de l'option --force

This commit is contained in:
grisel-davy 2018-08-08 19:52:04 +02:00
parent a6abe24418
commit 8efe64530a

View file

@ -11,6 +11,8 @@ import base64
import json import json
from subprocess import call from subprocess import call
import os.path import os.path
import sys
config = ConfigParser() config = ConfigParser()
config.read('config.ini') config.read('config.ini')
@ -23,6 +25,9 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
client_hostname = socket.gethostname().split('.', 1)[0] client_hostname = socket.gethostname().split('.', 1)[0]
for arg in sys.argv:
if arg=="--force":
generate(api_client)
def generate(api_client): def generate(api_client):
all_users = api_client.list("localemail/users") all_users = api_client.list("localemail/users")