RE: Exception handling

2001-06-27 Thread Mark Hammond
> except win32serviceutil.error: > print "Service already running!" use win32service.error here. You will need to import win32service first. Mark. ___ ActivePython mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/lis

RE: Exception handling

2001-06-27 Thread Robin Siebler
Hammond [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 27, 2001 3:57 PM To: Robin Siebler; [EMAIL PROTECTED] Subject: RE: Exception handling > def execute(testpath): > > try: > win32file.CopyFile(os.path.join(testpath, 'test.log'), > os.path.join('d:\\',

RE: Exception handling

2001-06-27 Thread Mark Hammond
> def execute(testpath): > > try: > win32file.CopyFile(os.path.join(testpath, 'test.log'), > os.path.join('d:\\', 'iTest', 'iDir Simple Test', 'OutputData', > 'test.log'), > 1) > except: > return 0 #File already exists! This works for me. >>> try: ... win32file.CopyF

RE: Exception handling

2001-06-27 Thread Robin Siebler
: Monday, June 25, 2001 5:54 PM To: Robin Siebler; [EMAIL PROTECTED] Subject: RE: Exception handling > def start_service(service, machine): > """Start a service""" > win32serviceutil.StartService(service, machine) > result = 1 #Service start

RE: Exception handling

2001-06-25 Thread Mark Hammond
> error: > api_error: (1056, 'StartService', 'An instance of the service is already > running.') > > How would I use exception handling to catch this? def start_service(service, machine): """Start a service""" try:

Exception handling

2001-06-25 Thread Robin Siebler
the following error: api_error: (1056, 'StartService', 'An instance of the service is already running.') How would I use exception handling to catch this? Thanks! Robin L. Siebler Software Test Engineer iBeam --