[Zope-CVS] CVS: Packages/JobBoardEx - JobList.py:1.8

Barry Warsaw barry@wooz.org
Wed, 20 Mar 2002 17:18:28 -0500


Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv31878

Modified Files:
	JobList.py 
Log Message:
__init__(), add(): Set the job id when we add a job.


=== Packages/JobBoardEx/JobList.py 1.7 => 1.8 ===
 
     def __init__(self):
+        self.id = 0
         self.jobs = PersistentList()
 
     def add(self, job):
+        # XXX do we have to worry about thread safety?
+        job.id = self.id
+        self.id += 1
         self.jobs.append(job)
 
     def remove(self, job):