From 594094fa5d8dc5597b061c57d883320ee3b7e729 Mon Sep 17 00:00:00 2001 From: Ludovico Pavesi Date: Thu, 11 Apr 2024 02:29:38 +0200 Subject: [PATCH] Fix compatibility with Python 3.9 --- caco-mela.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/caco-mela.py b/caco-mela.py index c461257..d085b62 100755 --- a/caco-mela.py +++ b/caco-mela.py @@ -2,7 +2,7 @@ import argparse import os import pwd -from typing import Optional +from typing import Optional, Union import ldap from dotenv import load_dotenv, find_dotenv @@ -18,7 +18,7 @@ def set_boolean(config: dict, var: str): config[var] = config[var].lower() not in ('0', 'no', 'false', 'n', 'off') -def parse_args(tests_env: Optional[str] = None) -> dict[str, str | bool]: +def parse_args(tests_env: Optional[str] = None) -> dict[str, Union[str, bool]]: parser = argparse.ArgumentParser(description='Provision SSH keys from a LDAP server, without syncing UIDs.', prog="caco-mela") parser.add_argument('--version', action='version', version='%(prog)s 1.0.0') parser.add_argument('-l', '--ldap', dest='LDAP_BIND_SERVER', type=str, help="LDAP server address")