From 8efe64530aa6b0827d2142923a831bda41b2477e Mon Sep 17 00:00:00 2001 From: grisel-davy Date: Wed, 8 Aug 2018 19:52:04 +0200 Subject: [PATCH] ajout de l'option --force --- main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.py b/main.py index 7533d8e..8c173ff 100755 --- a/main.py +++ b/main.py @@ -11,6 +11,8 @@ import base64 import json from subprocess import call import os.path +import sys + config = ConfigParser() config.read('config.ini') @@ -23,6 +25,9 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password) client_hostname = socket.gethostname().split('.', 1)[0] +for arg in sys.argv: + if arg=="--force": + generate(api_client) def generate(api_client): all_users = api_client.list("localemail/users")