diff options
-rwxr-xr-x | contrib/caldav/calcurse-caldav.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py index 7519af3..4d5e471 100755 --- a/contrib/caldav/calcurse-caldav.py +++ b/contrib/caldav/calcurse-caldav.py @@ -508,6 +508,9 @@ authcode = args.authcode verbose = args.verbose debug = args.debug +# Read environment variables +password = os.getenv('CALCURSE_CALDAV_PASSWORD') + # Read configuration. config = configparser.RawConfigParser() if verbose: @@ -563,10 +566,8 @@ if config.has_option('Auth', 'UserName'): else: username = None -if config.has_option('Auth', 'Password'): +if config.has_option('Auth', 'Password') and not password: password = config.get('Auth', 'Password') -else: - password = None if config.has_section('CustomHeaders'): custom_headers = dict(config.items('CustomHeaders')) |