Skip to content

Commit

Permalink
Fix: empty hwmon_str is checked in Service.check_dependencies().
Browse files Browse the repository at this point in the history
  • Loading branch information
petersulyok committed Mar 21, 2024
1 parent 88d9b87 commit 5831f5b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/smfc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1013,10 +1013,11 @@ def check_dependencies(self) -> str:

# Scan HWMON configuration for dependencies.
hwmon_str = self.config[HdZone.CS_HD_ZONE].get(HdZone.CV_HD_ZONE_HWMON_PATH)
if "\n" in hwmon_str:
hwmon_path = hwmon_str.splitlines()
else:
hwmon_path = hwmon_str.split()
if hwmon_str:
if "\n" in hwmon_str:
hwmon_path = hwmon_str.splitlines()
else:
hwmon_path = hwmon_str.split()
if hwmon_path:
for path in hwmon_path:
if path == HdZone.STR_HDD_TEMP:
Expand Down

0 comments on commit 5831f5b

Please sign in to comment.