~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/soyuz/model/initializedistroseriesjob.py

Switch to the JSON property raises other issues; reverting for now.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    "InitializeDistroSeriesJob",
8
8
]
9
9
 
 
10
import simplejson
10
11
from zope.interface import (
11
12
    classProvides,
12
13
    implements,
205
206
        # This method is called when error is an instance of
206
207
        # self.user_error_types.
207
208
        super(InitializeDistroSeriesJob, self).notifyUserError(error)
208
 
        self.metadata = dict(self.metadata, error_description=unicode(error))
 
209
        metadata = dict(self.metadata, error_description=unicode(error))
 
210
        self.context._json_data = simplejson.dumps(metadata).decode("utf-8")
209
211
 
210
212
    def getOopsVars(self):
211
213
        """See `IRunnableJob`."""