[pywin32-checkins] pywin32/win32/Demos/win32wnet testwnet.py, 1.3, 1.4
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2008-10-23 07:39:18
|
Update of /cvsroot/pywin32/pywin32/win32/Demos/win32wnet In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv305/win32/Demos/win32wnet Modified Files: testwnet.py Log Message: various improvements and modernizations from py3k branch. Index: testwnet.py =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/Demos/win32wnet/testwnet.py,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** testwnet.py 1 Oct 2008 14:44:53 -0000 1.3 --- testwnet.py 23 Oct 2008 07:39:12 -0000 1.4 *************** *** 27,31 **** win32wnet.WNetCloseEnum(k) # could do k.Close(), but this is a good test! except win32wnet.error, details: ! print indent + "Couldn't enumerate this resource: " + details[2] def TestOpenEnum(): --- 27,31 ---- win32wnet.WNetCloseEnum(k) # could do k.Close(), but this is a good test! except win32wnet.error, details: ! print indent + "Couldn't enumerate this resource: " + details.strerror def TestOpenEnum(): *************** *** 49,53 **** win32wnet.WNetAddConnection2(share.dwType, localName, share.lpRemoteName) except win32wnet.error, details: ! print "Couldn't connect: " + details[2] continue # Have a connection. --- 49,53 ---- win32wnet.WNetAddConnection2(share.dwType, localName, share.lpRemoteName) except win32wnet.error, details: ! print "Couldn't connect: " + details.strerror continue # Have a connection. *************** *** 57,61 **** print "Universal name of '%s' is '%s'" % (fname, win32wnet.WNetGetUniversalName(fname)) except win32wnet.error, details: ! print "Couldn't get universal name of '%s': %s" % (fname, details[2]) print "User name for this connection is", win32wnet.WNetGetUser(localName) finally: --- 57,61 ---- print "Universal name of '%s' is '%s'" % (fname, win32wnet.WNetGetUniversalName(fname)) except win32wnet.error, details: ! print "Couldn't get universal name of '%s': %s" % (fname, details.strerror) print "User name for this connection is", win32wnet.WNetGetUser(localName) finally: |