[pywin32-checkins] pywin32/win32/Demos/service pipeTestServiceClient.py, 1.3.4.1, 1.3.4.2
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-23 09:47:59
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/service In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv8245/win32/Demos/service Modified Files: Tag: py3k pipeTestServiceClient.py Log Message: merge various py3k friendly changes from the trunk. Index: pipeTestServiceClient.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/service/pipeTestServiceClient.py,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -C2 -d -r1.3.4.1 -r1.3.4.2 *** pipeTestServiceClient.py 29 Aug 2008 04:59:25 -0000 1.3.4.1 --- pipeTestServiceClient.py 23 Oct 2008 09:45:16 -0000 1.3.4.2 *************** *** 38,48 **** try: return fn(*args) ! except win32api.error as xxx_todo_changeme: ! (rc, fnerr, msg) = xxx_todo_changeme.args ! if rc==winerror.ERROR_PIPE_BUSY: win32api.Sleep(5000) continue else: ! raise win32api.error(rc, fnerr, msg) raise RuntimeError("Could not make a connection to the server") --- 38,47 ---- try: return fn(*args) ! except win32api.error as exc: ! if exc.winerror==winerror.ERROR_PIPE_BUSY: win32api.Sleep(5000) continue else: ! raise raise RuntimeError("Could not make a connection to the server") *************** *** 67,71 **** try: try: ! for i in range(numMessages): r = CallPipe(CallNamedPipe, ("\\\\%s\\pipe\\PyPipeTest" % server, "#" * 512, 1024, NMPWAIT_WAIT_FOREVER)) except: --- 66,70 ---- try: try: ! for i in xrange(numMessages): r = CallPipe(CallNamedPipe, ("\\\\%s\\pipe\\PyPipeTest" % server, "#" * 512, 1024, NMPWAIT_WAIT_FOREVER)) except: *************** *** 78,82 **** import _thread thread_waits = [] ! for t_num in range(numThreads): # Note I could just wait on thread handles (after calling DuplicateHandle) # See the service itself for an example of waiting for the clients... --- 77,81 ---- import _thread thread_waits = [] ! for t_num in xrange(numThreads): # Note I could just wait on thread handles (after calling DuplicateHandle) # See the service itself for an example of waiting for the clients... |