# HG changeset patch # User Paul Boddie # Date 1411336220 -7200 # Node ID f71e9cf75f4736311435ab7ecf659c9309cda1e9 # Parent 4bc0a825daad93f29439063ac187497fec9ccf06 Added some debugging statements. diff -r 4bc0a825daad -r f71e9cf75f47 imip_agent.py --- a/imip_agent.py Sun Sep 21 23:37:24 2014 +0200 +++ b/imip_agent.py Sun Sep 21 23:50:20 2014 +0200 @@ -34,8 +34,13 @@ "text/x-vcalendar", "application/ics", # other possibilities ] -def process(f): +def process(f, args): msg = message_from_file(f) + print >>open("/tmp/imip.txt", "a"), "----" + print >>open("/tmp/imip.txt", "a"), args + print >>open("/tmp/imip.txt", "a"), "----" + print >>open("/tmp/imip.txt", "a"), msg.as_string() + print >>open("/tmp/imip.txt", "a") # Handle messages with iTIP parts. @@ -97,6 +102,6 @@ print >>open("/tmp/imip.txt", "a"), journal if __name__ == "__main__": - process(sys.stdin) + process(sys.stdin, sys.argv[1:]) # vim: tabstop=4 expandtab shiftwidth=4