[pywin32-checkins] pywin32/win32/Lib win32serviceutil.py,1.18,1.19
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2005-05-30 23:57:22
|
Update of /cvsroot/pywin32/pywin32/win32/Lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28753 Modified Files: win32serviceutil.py Log Message: _GetServiceShortName() ignores case when looking for a service description Index: win32serviceutil.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Lib/win32serviceutil.py,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** win32serviceutil.py 27 May 2005 07:11:46 -0000 1.18 --- win32serviceutil.py 30 May 2005 23:57:13 -0000 1.19 *************** *** 51,54 **** --- 51,55 ---- hkey = win32api.RegOpenKey(win32con.HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services", 0, access) num = win32api.RegQueryInfoKey(hkey)[0] + longName = longName.lower() # loop through number of subkeys for x in range(0, num): *************** *** 57,63 **** skey = win32api.RegOpenKey(hkey, svc, 0, access) try: ! # find short name ! shortName = str(win32api.RegQueryValueEx(skey, "DisplayName")[0]) ! if shortName == longName: return svc except win32api.error: --- 58,64 ---- skey = win32api.RegOpenKey(hkey, svc, 0, access) try: ! # find display name ! thisName = str(win32api.RegQueryValueEx(skey, "DisplayName")[0]) ! if thisName.lower() == longName: return svc except win32api.error: |