~ubuntu-branches/ubuntu/hardy/apport/hardy

« back to all changes in this revision

Viewing changes to apport/report.py

  • Committer: Package Import Robot
  • Author(s): Martin Pitt, Martin Pitt, Sebastien Bacher
  • Date: 2008-04-01 16:02:46 UTC
  • Revision ID: package-import@ubuntu.com-20080401160246-up5vlb5a7l0kfhgi
Tags: 0.106
[ Martin Pitt ]
* apport/crashdb_impl/launchpad.py: Fix spelling mistake in p-lp-bugs API
  (now corrected there).
* apport_python_hook.py: Catch IndexError for invalid sys.argv[0], too.
  (LP: #204940)
* apport/ui.py: Add test_run_report_bug_unpackaged_pid() test case which
  reports a bug against a pid which belongs to an unpackaged program. This
  reproduces LP #203764.
* apport/report.py: Drop add_hooks_info() assertion on nonexisting Package
  field, return silently instead. This conforms to the behaviour of the
  other add_*_info() functions and avoids nasty error handling.
* apport/ui.py: Generate proper error message when calling with -f -p PID
  and PID belongs to an unpackaged program. (LP: #203764).

[ Sebastien Bacher ]
* po/Makevars: add the --language=python xgettext option so the translations
  template is correctly updated on build since cdbs is using intltool-update
  directly and not the corresponding makefile target

Show diffs side-by-side

added added

removed removed

Lines of Context:
510
510
        _common_hook_dir/*.py and has to contain a function 'add_info(report)'
511
511
        that takes and modifies a Report.'''
512
512
 
 
513
        if 'Package' not in self:
 
514
            return
513
515
        symb = {}
514
 
        assert self.has_key('Package')
515
516
 
516
517
        # common hooks
517
518
        for hook in glob.glob(_common_hook_dir + '/*.py'):
1397
1398
    report['BadField'] = 'XXX'
1398
1399
''')
1399
1400
            r = Report()
1400
 
            self.assertRaises(AssertionError, r.add_hooks_info)
1401
 
 
1402
 
            r = Report()
1403
1401
            r['Package'] = 'bar'
1404
1402
            # should not throw any exceptions
1405
1403
            r.add_hooks_info()