File: source_connman.py

package info (click to toggle)
connman 1.36-2.1~deb10u2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,272 kB
  • sloc: ansic: 88,493; sh: 11,471; python: 2,259; makefile: 468
file content (30 lines) | stat: -rw-r--r-- 996 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'''Apport package hook for ConnMan

(c) 2010 Canonical Ltd.
Contributors:
Kalle Valo <kalle.valo@canonical.com>

This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.  See http://www.gnu.org/copyleft/gpl.html for
the full text of the license.
'''

from __future__ import print_function
import apport.hookutils

def add_info(report, ui):
    apport.hookutils.attach_network(report)
    apport.hookutils.attach_wifi(report)
    apport.hookutils.attach_hardware(report)
    if not apport.packaging.is_distro_package(report['Package'].split()[0]):
        report['ThirdParty'] = 'True'
        report['CrashDB'] = 'connman'

if __name__ == '__main__':
    report = {}
    report['CrashDB'] = 'ubuntu'
    add_info(report, None)
    for key in report:
        print('%s: %s' % (key, report[key].split('\n', 1)[0]))