summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Brox <tobias@redpill-linpro.com>2019-01-25 12:42:45 +0100
committerTobias Brox <tobias@redpill-linpro.com>2019-01-25 12:42:45 +0100
commitc3112f7821fb01bffc7ff2e53dea9637ad7fbeb2 (patch)
tree32625eaa8e0af227e8c4b5a92555ce1c3950a771
parent4484367ea1bf9373af13aa3bfd0ee9d650e05bbf (diff)
downloadcalendar-cli-c3112f7821fb01bffc7ff2e53dea9637ad7fbeb2.zip
minor bugfix and some cleanup
-rwxr-xr-xcalendar-cli.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/calendar-cli.py b/calendar-cli.py
index 8e7d01f..ed7a95e 100755
--- a/calendar-cli.py
+++ b/calendar-cli.py
@@ -2,7 +2,7 @@
"""
calendar-cli.py - high-level cli against caldav servers
-Copyright (C) 2013-2016 Tobias Brox and other contributors
+Copyright (C) 2013-2018 Tobias Brox and other contributors
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,7 +38,7 @@ import urllib3
__version__ = "0.11.0.dev0"
__author__ = "Tobias Brox"
__author_short__ = "tobixen"
-__copyright__ = "Copyright 2013-2016, Tobias Brox"
+__copyright__ = "Copyright 2013-2018, Tobias Brox"
#__credits__ = []
__license__ = "GPLv3+"
__license_url__ = "http://www.gnu.org/licenses/gpl-3.0-standalone.html"
@@ -153,8 +153,8 @@ def _calendar_addics(caldav_conn, ics, uid, args):
ics = re.sub(r'^METHOD:[A-Z]+[\r\n]+', '', ics, flags=re.MULTILINE)
print ("METHOD property found and ignored")
c.add_event(ics)
- except caldav.lib.error.AuthorizationError as e:
- print("Error logging in");
+ except caldav.lib.error.AuthorizationError:
+ print("Error logging in")
sys.exit(2)
"""
Peter Havekes: This needs more checking. It works for me when connecting to O365
@@ -294,7 +294,7 @@ def calendar_add(caldav_conn, args):
## read timestamps from arguments
event_spec = args.event_time.split('+')
if len(event_spec)>3:
- raise ValueError('Invalid event time "%s" - can max contain 2 plus-signs' % event_time)
+ raise ValueError('Invalid event time "%s" - can max contain 2 plus-signs' % args.event_time)
elif len(event_spec)==3:
event_time = '%s+%s' % tuple(event_spec[0:2])
event_duration = event_spec[2]