~usb-creator-hackers/usb-creator/trunk

« back to all changes in this revision

Viewing changes to debian/source_usb-creator.py

  • Committer: Benjamin Drung
  • Date: 2022-11-02 13:01:26 UTC
  • Revision ID: benjamin.drung@canonical.com-20221102130126-4z0xyivy5f37dp13
Move to https://code.launchpad.net/~usb-creator-hackers/usb-creator/+git/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
'''apport package hook for usb-creator
2
 
 
3
 
(c) 2010 Canonical Ltd.
4
 
Author: Brian Murray <brian@ubuntu.com>
5
 
'''
6
 
 
7
 
from apport.hookutils import *
8
 
from os import path, getenv
9
 
 
10
 
def add_info(report):
11
 
 
12
 
    cache_dir = getenv('XDG_CACHE_HOME', path.expanduser('~/.cache'))
13
 
    log_file = path.join(cache_dir, 'usb-creator.log')
14
 
    attach_file_if_exists(report, log_file, 'UsbCreatorLog')
15
 
 
16
 
    report['UsbDevices'] = usb_devices()
17
 
    if apport.hookutils.command_available('udisks'):
18
 
        report['UDisksDump'] = apport.hookutils.command_output(['udisks', '--dump'])