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:
34452e2
)
add utility function to pop an event from the cache
author
Matthew Vernon
<mv3@sanger.ac.uk>
Fri, 19 Oct 2018 10:21:36 +0000
(11:21 +0100)
committer
Matthew Vernon
<mv3@sanger.ac.uk>
Fri, 19 Oct 2018 10:21:36 +0000
(11:21 +0100)
gooswapper.py
patch
|
blob
|
history
diff --git
a/gooswapper.py
b/gooswapper.py
index a4029f0971779d625a847e7338f31d363cea1c8e..b14a6954d5865547df89141990ccc921da4edf79 100644
(file)
--- a/
gooswapper.py
+++ b/
gooswapper.py
@@
-56,6
+56,14
@@
class ex_gcal_link(exchangelib.ExtendedProperty):
exchangelib.CalendarItem.register('gcal_link',ex_gcal_link)
+#useful if you want to replay an event
+def drop_from_ex_cache(itemid):
+ with open(cachepath,"rb") as f:
+ cache = pickle.load(f)
+ cache.pop(itemid)
+ with open(cachepath,"wb") as f:
+ pickle.dump(cache,f)
+
def get_ex_event_by_itemid(calendar,itemid):
return calendar.get(item_id=itemid)