1
'''apport package hook for usb-creator
3
(c) 2010 Canonical Ltd.
4
Author: Brian Murray <brian@ubuntu.com>
7
from apport.hookutils import *
8
from os import path, getenv
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')
16
report['UsbDevices'] = usb_devices()
17
if apport.hookutils.command_available('udisks'):
18
report['UDisksDump'] = apport.hookutils.command_output(['udisks', '--dump'])