1
# Apport integration for Ubuntu One client
3
# Copyright 2009 Canonical Ltd.
5
# This program is free software: you can redistribute it and/or modify it
6
# under the terms of the GNU General Public License version 3, as published
7
# by the Free Software Foundation.
9
# This program is distributed in the hope that it will be useful, but
10
# WITHOUT ANY WARRANTY; without even the implied warranties of
11
# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
12
# PURPOSE. See the GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License along
15
# with this program. If not, see <http://www.gnu.org/licenses/>.
17
# pylint: disable-msg=F0401,C0103
18
# shut up about apport. We know. We don't want to backport it for pqm
19
from apport.hookutils import attach_file_if_exists, packaging
21
from xdg.BaseDirectory import xdg_cache_home
23
u1_client_log = os.path.join(xdg_cache_home, "ubuntuone", "log",
25
u1_except_log = os.path.join(xdg_cache_home, "ubuntuone", "log",
26
"syncdaemon-exceptions.log")
27
u1_oauth_log = os.path.join(xdg_cache_home, "ubuntuone", "log",
32
attach_file_if_exists(report, u1_client_log)
33
attach_file_if_exists(report, u1_except_log)
34
attach_file_if_exists(report, u1_oauth_log)
37
packages = ['ubuntuone-client',
38
'ubuntuone-storage-protocol',
42
for package in packages:
44
version = packaging.get_version(package)
49
versions += '%s %s\n' % (package, version)
50
report['UbuntuoneClientPackages'] = versions