chiark
/
gitweb
/
~matthewv
/
gooswapper
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ed3848
)
only register gcal_link if necessary
author
Matthew Vernon
<mv3@sanger.ac.uk>
Fri, 19 Oct 2018 11:41:54 +0000
(12:41 +0100)
committer
Matthew Vernon
<mv3@sanger.ac.uk>
Fri, 19 Oct 2018 11:41:54 +0000
(12:41 +0100)
gooswapper.py
patch
|
blob
|
history
diff --git
a/gooswapper.py
b/gooswapper.py
index f3c73a0610e4c4dcaab4faeb39f249957a1954ac..75edd3febb2c54bcd77979cfadd513b4268f169e 100644
(file)
--- a/
gooswapper.py
+++ b/
gooswapper.py
@@
-54,7
+54,10
@@
class ex_gcal_link(exchangelib.ExtendedProperty):
property_name = "google calendar event id"
property_type = 'String'
-exchangelib.CalendarItem.register('gcal_link',ex_gcal_link)
+try:
+ exchangelib.CalendarItem.get_field_by_fieldname('gcal_link')
+except ValueError:
+ exchangelib.CalendarItem.register('gcal_link',ex_gcal_link)
#useful if you want to replay an event
def drop_from_ex_cache(itemid):