Update of /cvsroot/pywin32/pywin32/com/win32com/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv367/com/win32com/test
Modified Files:
testExchange.py
Log Message:
Fail gracefully when CDO/MAPI is not installed.
Index: testExchange.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/test/testExchange.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** testExchange.py 23 Oct 2003 06:56:17 -0000 1.5
--- testExchange.py 23 Oct 2005 11:31:35 -0000 1.6
***************
*** 52,57 ****
#
PropTagsById={}
! for name, val in ammodule.constants.__dict__.items():
! PropTagsById[val] = name
--- 52,58 ----
#
PropTagsById={}
! if ammodule:
! for name, val in ammodule.constants.__dict__.items():
! PropTagsById[val] = name
***************
*** 75,78 ****
--- 76,83 ----
def test():
+ if not ammodule:
+ print "MAPI does not appear to be installed on this machine - skipping."
+ return
+
import win32com.client
oldcwd = os.getcwd()
|