Codebase list battery-stats / ebf5283
[ Debian Janitor ] New upstream snapshot. Debian Janitor 2 years ago
3 changed file(s) with 28 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
0 battery-stats (0.5.6-2) UNRELEASED; urgency=medium
0 battery-stats (0.5.6+git20181021.1.b231366-1) UNRELEASED; urgency=medium
11
22 [ Ondřej Nový ]
33 * d/control: Remove ancient X-Python-Version field
1717 * Bump Standards-Version to 4.5.0:
1818 - Add Rules-Requires-Root: no.
1919
20 -- Ondřej Nový <onovy@debian.org> Mon, 01 Oct 2018 09:56:14 +0200
20 [ Debian Janitor ]
21 * New upstream snapshot.
22
23 -- Ondřej Nový <onovy@debian.org> Sat, 02 Oct 2021 13:08:21 -0000
2124
2225 battery-stats (0.5.6-1) unstable; urgency=medium
2326
2323
2424 if [ -f /sys/class/power_supply/AC/online ]; then
2525 aconline=$(cat /sys/class/power_supply/AC/online)
26 elif [ -f /sys/class/power_supply/AC0/online ]; then
27 aconline=$(cat /sys/class/power_supply/AC0/online)
2628 elif [ -f /sys/class/power_supply/ACAD/online ]; then
2729 aconline=$(cat /sys/class/power_supply/ACAD/online)
30 elif [ -f /sys/class/power_supply/ADP0/online ]; then
31 aconline=$(cat /sys/class/power_supply/ADP0/online)
2832 elif [ -f /sys/class/power_supply/ADP1/online ]; then
2933 aconline=$(cat /sys/class/power_supply/ADP1/online)
3034 else
31 echo "No power supply found"
35 aconline="none"
3236 fi
3337
34 if [ 1 = "$aconline" ]; then
38 if [ "$aconline" = "none" ]; then
39 state=0
40 elif [ 1 = "$aconline" ]; then
3541 state=2
3642 else
3743 state=1
4848 now = 'energy_now'
4949 full = 'energy_full'
5050 full_design = 'energy_full_design'
51
52 # keep a copy of the original iterator function
53 real_readline = logfiles.next
54
55 def sanitized_readline():
56 """clear out null characters from input
57
58 Those show up in the CSV logfiles frequently as updates happen during
59 shutdown or power outages.
60 """
61 line = real_readline()
62 return line.replace("\0", "")
63
64 # replace the iterator with our filtered version
65 logfiles.next = sanitized_readline
5166
5267 def parse_csv_np():
5368 logging.debug('loading CSV file %s with NumPy', args.logfile)