[pywin32-checkins] pywin32/com/win32com/client genpy.py,1.67,1.68
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2010-08-30 00:52:23
|
Update of /cvsroot/pywin32/pywin32/com/win32com/client In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv23040 Modified Files: genpy.py Log Message: avoid generating invalid constants class for some objects Index: genpy.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/com/win32com/client/genpy.py,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** genpy.py 3 Jun 2010 18:40:23 -0000 1.67 --- genpy.py 30 Aug 2010 00:52:15 -0000 1.68 *************** *** 195,198 **** --- 195,199 ---- def WriteEnumerationItems(self, stream): + num = 0 enumName = self.doc[0] # Write in name alpha order *************** *** 216,219 **** --- 217,222 ---- print >> stream, "\t%-30s=%-10s # from enum %s" % \ (build.MakePublicAttributeName(name, True), use, enumName) + num += 1 + return num class VTableItem(build.VTableItem, WritableItem): *************** *** 869,875 **** items = enumItems.values() items.sort() for oleitem in items: ! oleitem.WriteEnumerationItems(stream) self.progress.Tick() print >> stream --- 872,881 ---- items = enumItems.values() items.sort() + num_written = 0 for oleitem in items: ! num_written += oleitem.WriteEnumerationItems(stream) self.progress.Tick() + if not num_written: + print >> stream, "\tpass" print >> stream |