Update of /cvsroot/pywin32/pywin32/com/win32comext/bits/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12220/com/win32comext/bits/test
Modified Files:
Tag: sidnei-bits
test_bits.py
Log Message:
- Cleanup a tiny bit
Index: test_bits.py
===================================================================
RCS file: /cvsroot/pywin32/pywin32/com/win32comext/bits/test/Attic/test_bits.py,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -C2 -d -r1.1.2.6 -r1.1.2.7
*** test_bits.py 8 Feb 2008 01:54:31 -0000 1.1.2.6
--- test_bits.py 8 Feb 2008 13:43:57 -0000 1.1.2.7
***************
*** 56,60 ****
state = job.GetState()
print 'Job Modification', job.GetDisplayName(), states.get(state)
! if state in (bits.BG_JOB_STATE_ERROR, bits.BG_JOB_STATE_TRANSIENT_ERROR):
print "Error details:"
err = job.GetError()
--- 56,62 ----
state = job.GetState()
print 'Job Modification', job.GetDisplayName(), states.get(state)
! # Need to catch TRANSIENT_ERROR here, as JobError doesn't get
! # called (apparently) when the error is transient.
! if state == bits.BG_JOB_STATE_TRANSIENT_ERROR:
print "Error details:"
err = job.GetError()
***************
*** 62,66 ****
job = bcm.CreateJob(job_name, bits.BG_JOB_TYPE_DOWNLOAD)
- print job
job.SetNotifyInterface(wrap(BackgroundJobCallback()))
--- 64,67 ----
***************
*** 84,97 ****
job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico'))
! # job.Suspend()
!
! enum = job.EnumFiles()
! while True:
! files = enum.Next()
! if not files:
! break
! for f in files:
! print 'Downloading', f.GetRemoteName()
! print 'To', f.GetLocalName()
job.Resume()
--- 85,91 ----
job.AddFile('http://www.python.org/missing-favicon.ico', os.path.join(tempfile.gettempdir(), 'bits-missing-favicon.ico'))
! for f in job.EnumFiles():
! print 'Downloading', f.GetRemoteName()
! print 'To', f.GetLocalName()
job.Resume()
|