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

« back to all changes in this revision

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

  • Committer: Robert Collins
  • Date: 2011-10-24 05:21:01 UTC
  • Revision ID: robertc@robertcollins.net-20111024052101-m1er1qzem8v9wibg
Do not use url for pageid when pageid is missing.

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)