aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/caldav
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/caldav')
-rwxr-xr-xcontrib/caldav/calcurse-caldav.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/contrib/caldav/calcurse-caldav.py b/contrib/caldav/calcurse-caldav.py
index 29ac328..b8d2582 100755
--- a/contrib/caldav/calcurse-caldav.py
+++ b/contrib/caldav/calcurse-caldav.py
@@ -688,12 +688,10 @@ try:
# Authenticate with OAuth2 and authorize HTTP object
cred = run_auth(authcode)
conn = cred.authorize(conn)
-
- # Add credentials to httplib2 to be used when request requires authentication
- if authmethod == 'basic':
+ elif authmethod == 'basic':
+ # Add credentials to httplib2
conn.add_credentials(username, password)
-
- elif authmethod != 'basic':
+ else:
die('Invalid option for AuthMethod in config file. Use "basic" or "oauth2"')
if init: