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

« back to all changes in this revision

Viewing changes to apport_python_hook.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:
40
40
        # apport will look up the package from the executable path.
41
41
        try:
42
42
            binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
43
 
        except (TypeError, AttributeError):
 
43
        except (TypeError, AttributeError, IndexError):
44
44
            # the module has mutated sys.argv, plan B
45
45
            try:
46
46
                binary = os.readlink('/proc/%i/exe' % os.getpid())