[pywin32-checkins] pywin32/win32/Lib regutil.py,1.3.4.3,1.3.4.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2009-01-05 12:51:33
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv4261/win32/Lib Modified Files: Tag: py3k regutil.py Log Message: merge lots of changes (most via 2to3) from the trunk Index: regutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/regutil.py,v retrieving revision 1.3.4.3 retrieving revision 1.3.4.4 diff -C2 -d -r1.3.4.3 -r1.3.4.4 *** regutil.py 27 Nov 2008 11:31:05 -0000 1.3.4.3 --- regutil.py 5 Jan 2009 12:51:27 -0000 1.3.4.4 *************** *** 31,44 **** """A helper to set the default value for a key in the registry """ - import types if rootkey is None: rootkey = GetRootKey() ! if isinstance(value, str): typeId = win32con.REG_SZ ! elif isinstance(value, bytes): ! typeId = win32con.REG_BINARY ! elif isinstance(value, int): typeId = win32con.REG_DWORD else: ! raise TypeError("Value must be string or integer - was passed " + str(value)) win32api.RegSetValue(rootkey, subKey, typeId ,value) --- 31,41 ---- """A helper to set the default value for a key in the registry """ if rootkey is None: rootkey = GetRootKey() ! if type(value)==str: typeId = win32con.REG_SZ ! elif type(value)==int: typeId = win32con.REG_DWORD else: ! raise TypeError("Value must be string or integer - was passed " + repr(value)) win32api.RegSetValue(rootkey, subKey, typeId ,value) |