[ Debian Janitor ]
New upstream snapshot.
Debian Janitor
2 years ago
0 | |
battery-stats (0.5.6-2) UNRELEASED; urgency=medium
|
|
0 |
battery-stats (0.5.6+git20181021.1.b231366-1) UNRELEASED; urgency=medium
|
1 | 1 |
|
2 | 2 |
[ Ondřej Nový ]
|
3 | 3 |
* d/control: Remove ancient X-Python-Version field
|
|
17 | 17 |
* Bump Standards-Version to 4.5.0:
|
18 | 18 |
- Add Rules-Requires-Root: no.
|
19 | 19 |
|
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
|
21 | 24 |
|
22 | 25 |
battery-stats (0.5.6-1) unstable; urgency=medium
|
23 | 26 |
|
23 | 23 |
|
24 | 24 |
if [ -f /sys/class/power_supply/AC/online ]; then
|
25 | 25 |
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)
|
26 | 28 |
elif [ -f /sys/class/power_supply/ACAD/online ]; then
|
27 | 29 |
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)
|
28 | 32 |
elif [ -f /sys/class/power_supply/ADP1/online ]; then
|
29 | 33 |
aconline=$(cat /sys/class/power_supply/ADP1/online)
|
30 | 34 |
else
|
31 | |
echo "No power supply found"
|
|
35 |
aconline="none"
|
32 | 36 |
fi
|
33 | 37 |
|
34 | |
if [ 1 = "$aconline" ]; then
|
|
38 |
if [ "$aconline" = "none" ]; then
|
|
39 |
state=0
|
|
40 |
elif [ 1 = "$aconline" ]; then
|
35 | 41 |
state=2
|
36 | 42 |
else
|
37 | 43 |
state=1
|
48 | 48 |
now = 'energy_now'
|
49 | 49 |
full = 'energy_full'
|
50 | 50 |
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
|
51 | 66 |
|
52 | 67 |
def parse_csv_np():
|
53 | 68 |
logging.debug('loading CSV file %s with NumPy', args.logfile)
|