Skip to content
Browse files

Ignore lines that are not parseable (Lotus Notes)

  • Loading branch information...
1 parent bf9ea88 commit 56a9996a3f3fb66a045175e548e88cf15d7bc30d Martin Sander committed
Showing with 4 additions and 1 deletion.
  1. +4 −1 mutt-ical.py
View
5 mutt-ical.py
@@ -12,6 +12,7 @@
import vobject
import tempfile, time
import os, sys
+import warnings
from datetime import datetime
from subprocess import Popen, PIPE
from getopt import gnu_getopt as getopt
@@ -119,7 +120,9 @@ def execute(command, mailtext):
invitation_file = args[0]
with open(invitation_file) as f:
- invitation = vobject.readOne(f)
+ with warnings.catch_warnings(): #vobject uses deprecated Exception stuff
+ warnings.simplefilter("ignore")
+ invitation = vobject.readOne(f, ignoreUnreadable=True)
ans = get_answer(invitation)

0 comments on commit 56a9996

Please sign in to comment.
Something went wrong with that request. Please try again.