[pywin32-checkins] pywin32/com/win32com/client dynamic.py, 1.30, 1.31
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
|
From: Mark H. <mha...@us...> - 2009-02-10 11:16:50
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv15811/com/win32com/client Modified Files: dynamic.py Log Message: use startswith/endswith to prevent errors if someone passes an empty attr Index: dynamic.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/dynamic.py,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** dynamic.py 4 Feb 2009 04:01:25 -0000 1.30 --- dynamic.py 10 Feb 2009 11:16:43 -0000 1.31 *************** *** 449,453 **** return Factory(enum) ! if attr[0]=='_' and attr[-1]=='_': # Fast-track. raise AttributeError(attr) # If a known method, create new instance and return. --- 449,453 ---- return Factory(enum) ! if attr.startswith('_') and attr.endswith('_'): # Fast-track. raise AttributeError(attr) # If a known method, create new instance and return. |