Update of /cvsroot/pywin32/pywin32/win32/Demos/service
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23628
Modified Files:
serviceEvents.py
Log Message:
tweaks to the messages we write on service events.
Index: serviceEvents.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/win32/Demos/service/serviceEvents.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** serviceEvents.py 7 Feb 2008 03:33:15 -0000 1.1
--- serviceEvents.py 12 Feb 2008 12:53:07 -0000 1.2
***************
*** 32,44 ****
# XXX can't do SERVICE_CONTROL_DEVICEEVENT until we wrap RegisterDeviceNotification.
if control == win32service.SERVICE_CONTROL_HARDWAREPROFILECHANGE:
! msg = "A hardware profile changed: change type %d" % (event_type,)
elif control == win32service.SERVICE_CONTROL_POWEREVENT:
! msg = "A power event: setting guid=%d, raw_data=%s" % data
elif control == win32service.SERVICE_CONTROL_SESSIONCHANGE:
# data is a single elt tuple, but this could potentially grow
# in the future if the win32 struct does
! msg = "Session event: session ID=%d" % data[:1]
else:
! msg = "Other event: code=%d, event_type=%d, data=%s" \
% (control, event_type, data)
--- 32,44 ----
# XXX can't do SERVICE_CONTROL_DEVICEEVENT until we wrap RegisterDeviceNotification.
if control == win32service.SERVICE_CONTROL_HARDWAREPROFILECHANGE:
! msg = "A hardware profile changed: type=%s, data=%s" % (event_type, data)
elif control == win32service.SERVICE_CONTROL_POWEREVENT:
! msg = "A power event: setting %s" % data
elif control == win32service.SERVICE_CONTROL_SESSIONCHANGE:
# data is a single elt tuple, but this could potentially grow
# in the future if the win32 struct does
! msg = "Session event: type=%s, data=%s" % (event_type, data)
else:
! msg = "Other event: code=%d, type=%s, data=%s" \
% (control, event_type, data)
|