fix to detect n900 battery; add support to built in battery variables to work with...
[monky] / debian / conky.py
1 '''apport package hook for conky
2
3 Collect conky conf file, conky user's conf file and any specified lua script
4
5 Copyright 2009 Cesare Tirabassi <norsetto@ubuntu.com>
6
7 '''
8
9 from apport.hookutils import *
10 from os import path
11 import re
12
13 def add_info(report):
14         attach_conffiles(report, 'conky')
15         conkyrc_path = path.expanduser('~/.conkyrc')
16         if path.exists(conkyrc_path):
17             attach_file(report, conkyrc_path)
18             for file in re.findall("^lua_load\s+(.*?)$",
19                                    open(conkyrc_path).read(),
20                                    re.MULTILINE):
21                 attach_file_if_exists(report, file)