Skip to content

Commit

Permalink
Fixed: missing type conversion added.
Browse files Browse the repository at this point in the history
  • Loading branch information
petersulyok committed Jan 1, 2024
1 parent 14d5808 commit c149014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/diskinfo/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ def get_temperature(self) -> float:
if not self.__hwmon_path or not os.path.exists(self.__hwmon_path):
raise RuntimeError(f"ERROR: File does not exists (hwmon={self.__hwmon_path})")
try:
temp = ((_read_file(self.__hwmon_path)) / 1000.0)
temp = (float(_read_file(self.__hwmon_path)) / 1000.0)
except ValueError as e:
raise e
return temp
Expand Down

0 comments on commit c149014

Please sign in to comment.