[pywin32-checkins] pywin32/com/win32com/test testExchange.py,1.4,1.5
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: <mha...@us...> - 2003-10-23 14:14:26
|
Update of /cvsroot/pywin32/pywin32/com/win32com/test In directory sc8-pr-cvs1:/tmp/cvs-serv26852 Modified Files: testExchange.py Log Message: Handle an error when in offline mode. Index: testExchange.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExchange.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** testExchange.py 18 Nov 2002 11:20:06 -0000 1.4 --- testExchange.py 23 Oct 2003 06:56:17 -0000 1.5 *************** *** 1,3 **** --- 1,6 ---- # TestExchange = Exchange Server Dump + # Note that this code uses "CDO", which is unlikely to get the best choice. + # You should use the Outlook object model, or + # the win32com.mapi examples for a low-level interface. from win32com.client import gencache, constants *************** *** 36,40 **** infostore = infostores[i+1] print "Infostore = ", infostore.Name ! folder = infostore.RootFolder DumpFolder(folder) --- 39,50 ---- infostore = infostores[i+1] print "Infostore = ", infostore.Name ! try: ! folder = infostore.RootFolder ! except pythoncom.com_error, details: ! hr, msg, exc, arg = details ! # -2147221219 == MAPI_E_FAILONEPROVIDER - a single provider temporarily not available. ! if exc and exc[-1]==-2147221219: ! print "This info store is currently not available" ! continue DumpFolder(folder) |