Update of /cvsroot/pywin32/pywin32/com/win32com/servers
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv16341/win32com/servers
Modified Files:
Tag: py3k
perfmon.py
Log Message:
Modernize exception catching
Index: perfmon.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32com/servers/perfmon.py,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -C2 -d -r1.1.4.1 -r1.1.4.2
*** perfmon.py 26 Nov 2008 09:03:29 -0000 1.1.4.1
--- perfmon.py 19 Dec 2008 02:33:04 -0000 1.1.4.2
***************
*** 18,27 ****
try:
return win32pdhutil.GetPerformanceAttributes(object, counter, instance, machine=machine)
! except win32pdhutil.error as xxx_todo_changeme:
! (rc, fn, desc) = xxx_todo_changeme.args
! raise exception.Exception(desc=desc)
except TypeError as desc:
raise exception.Exception(desc=desc,scode=winerror.DISP_E_TYPEMISMATCH)
!
if __name__=='__main__':
print("Registering COM server...")
--- 18,26 ----
try:
return win32pdhutil.GetPerformanceAttributes(object, counter, instance, machine=machine)
! except win32pdhutil.error as exc:
! raise exception.Exception(desc=exc.strerror)
except TypeError as desc:
raise exception.Exception(desc=desc,scode=winerror.DISP_E_TYPEMISMATCH)
!
if __name__=='__main__':
print("Registering COM server...")
|