~pitti/apport/api.launchpadlib

« back to all changes in this revision

Viewing changes to general-hooks/generic.py

  • Committer: Martin Pitt
  • Date: 2009-04-11 18:33:15 UTC
  • mfrom: (1199.12.22 trunk)
  • Revision ID: martin.pitt@canonical.com-20090411183315-zz0ufi2z7i0wp7hm
* Merge from trunk:
  - Lots of apport.hookutils improvements, thanks to Matt Zimmerman!
  - Move determination of nonfree kernel modules from core code to generic
    hook.
  - Add new field Report.pid which gets set on add_proc_info() and can be
    used by hooks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'''Attach generally useful information, not specific to any package.
 
2
 
 
3
Copyright (C) 2009 Canonical Ltd.
 
4
Author: Matt Zimmerman <mdz@canonical.com>
 
5
 
 
6
This program is free software; you can redistribute it and/or modify it
 
7
under the terms of the GNU General Public License as published by the
 
8
Free Software Foundation; either version 2 of the License, or (at your
 
9
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
 
10
the full text of the license.
 
11
'''
 
12
 
 
13
import apport.hookutils
 
14
 
 
15
def add_info(report):
 
16
    nm = apport.hookutils.nonfree_kernel_modules()
 
17
    if nm:
 
18
        report['NonfreeKernelModules'] = ' '.join(nm)