@@ -35,11 +35,14 @@ def battery_stop_threshold():
35
35
def battery_setup ():
36
36
root_check ()
37
37
conf = get_config ()
38
- if conf .has_option ("battery" , "enable_thresholds" ) and conf ["battery" ]["enable_thresholds" ] == "true" :
39
- if lsmod ("thinkpad_acpi" ):
40
- thinkpad_setup (battery_start_threshold (), battery_stop_threshold ())
41
- elif lsmod ("ideapad_acpi" ):
42
- ideapad_setup (battery_start_threshold (), battery_stop_threshold ())
38
+ if conf .has_option ("battery" , "enable_thresholds" ):
39
+ if conf ["battery" ]["enable_thresholds" ] == "true" :
40
+ if lsmod ("thinkpad_acpi" ):
41
+ thinkpad_setup (battery_start_threshold (), battery_stop_threshold ())
42
+ elif lsmod ("ideapad_acpi" ):
43
+ ideapad_setup (battery_start_threshold (), battery_stop_threshold ())
44
+ else :
45
+ pass
43
46
else :
44
47
pass
45
48
else :
@@ -48,13 +51,16 @@ def battery_setup():
48
51
49
52
def battery_get_thresholds ():
50
53
conf = get_config ()
51
- if conf ["battery" ]["enable_thresholds" ] == "true" :
52
- print ("-" * 30 )
53
- if lsmod ("thinkpad_acpi" ):
54
- thinkpad_print_thresholds ()
55
- elif lsmod ("ideapad_acpi" ):
56
- ideapad_print_thresholds ()
54
+ if conf .has_option ("battery" , "enable_thresholds" ):
55
+ if conf ["battery" ]["enable_thresholds" ] == "true" :
56
+ print ("-" * 30 )
57
+ if lsmod ("thinkpad_acpi" ):
58
+ thinkpad_print_thresholds ()
59
+ elif lsmod ("ideapad_acpi" ):
60
+ ideapad_print_thresholds ()
61
+ else :
62
+ pass
57
63
else :
58
- pass
64
+ return
59
65
else :
60
66
return
0 commit comments