~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/model/bugjob.py

Merged db-devel

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        :param metadata: The type-specific variables, as a JSON-compatible
64
64
            dict.
65
65
        """
66
 
        Storm.__init__(self)
 
66
        super(BugJob, self).__init__()
67
67
        json_data = simplejson.dumps(metadata)
68
68
        self.job = Job()
69
69
        self.bug = bug
91
91
    def __init__(self, job):
92
92
        self.context = job
93
93
 
94
 
    # We need to define __eq__ and __ne__ here to prevent the security
95
 
    # proxy from mucking up our comparisons in tests and elsewhere.
96
 
 
97
 
    def __eq__(self, job):
98
 
        return (
99
 
            self.__class__ is removeSecurityProxy(job.__class__)
100
 
            and self.job == job.job)
101
 
 
102
 
    def __ne__(self, job):
103
 
        return not (self == job)
104
 
 
105
94
    @classmethod
106
95
    def create(cls, bug):
107
96
        """See `IBugJob`."""