~lifeless/python-oops-tools/bug-881400

« back to all changes in this revision

Viewing changes to src/oopstools/oops/dbsummaries.py

  • Committer: Tarmac
  • Author(s): Robert Collins
  • Date: 2011-10-25 02:30:42 UTC
  • mfrom: (4.2.3 bug-879309)
  • Revision ID: launchpad@pqm.canonical.com-20111025023042-9h154ehut9sk7fbz
Handle unicode urls and missing topics better.

Show diffs side-by-side

added added

removed removed

Lines of Context:
126
126
        for data in res:
127
127
            if data['url'].startswith(data['pageid']):
128
128
                data['pageid'] = 'Unknown'
 
129
            if data['pageid'] == '':
 
130
                data['pageid'] = 'Unknown'
129
131
            data['escaped_url'] = _escape(data['url'])
130
132
            data['errors'] = data['errors'].split(',')
131
133
            data['errors'].sort()
418
420
            # might end up with multiple instances of the same top value
419
421
            # and pageid. Here we store all those OOPSes in a list but
420
422
            # self.render* methods display only the first one.
 
423
            if not pageid:
 
424
                pageid = 'Unknown'
421
425
            if self.top_errors and self.top_errors[-1][2] == pageid:
422
426
                assert self.top_errors[-1][0] == value, 'programmer error'
423
427
                self.top_errors[-1][1].append(oopsid)