Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class accton_as7816_monitor(object):

def __init__(self, log_file, log_level):
"""Needs a logger and a logger level."""

self.thermal = ThermalUtil()
self.fan = FanUtil()
# set up logging to file
logging.basicConfig(
filename=log_file,
Expand Down Expand Up @@ -83,8 +86,8 @@ def manage_fans(self):
4: [max_duty, 57000, sys.maxsize],
}

thermal = ThermalUtil()
fan = FanUtil()
thermal = self.thermal
fan = self.fan
for x in range(fan.get_idx_fan_start(), fan.get_num_fans()+1):
fan_status = fan.get_fan_status(x)
if fan_status is None:
Expand Down