[python-win32] Selecttlb doesn't handle hexadecimal version numbers (patch attached)

Johan Lindvall johan.lindvall at gmail.com
Tue Aug 14 09:35:37 CEST 2007


Hi,

It appears Selecttlb.py for pywin32 210 doesn't handle typelibs with
hexadecimal version numbers. After updating our app to version 10.0
(a.0), we cannot use makepy anymore.

The following patch fixed the problem:

Index: selecttlb.py
===================================================================
--- selecttlb.py	(revision 36133)
+++ selecttlb.py	(working copy)
@@ -92,7 +92,8 @@
 				major = int(major_minor[0])
 				minor = int(major_minor[1])
 			except ValueError: # crap in the registry!
-				continue
+				major = -1 # set dummy values and continue working with string
based version number
+				minor = -1
 			
 			key3 = win32api.RegOpenKey(key2, str(version))
 			try:


===================================================================

Regards,

-- 
/Johan.


More information about the python-win32 mailing list