Skip to content

Commit

Permalink
fix : Zone parameter renamed to zone
Browse files Browse the repository at this point in the history
  • Loading branch information
sepandhaghighi committed Dec 7, 2020
1 parent 5e9631c commit f31652e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions orangetool/orangetool_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,19 +30,19 @@ def check_update(debug=False):
return "Error"


def get_temp(Zone=0, debug=False):
def get_temp(zone=0, debug=False):
"""
Read cpu temperature.
:param debug : flag for using debug mode
:param Zone : thermal Zone Index
:param zone : thermal zone index
:type debug:bool
:type Zone:int
:type zone:int
:return: board temp as string in celsius
"""
try:
command = open("/sys/class/thermal/thermal_zone" + str(Zone) + "/temp")
# command=sub.Popen(["cat","/sys/class/thermal/thermal_zone"+str(Zone)+"/temp"],stderr=sub.PIPE,stdin=sub.PIPE,stdout=sub.PIPE)
command = open("/sys/class/thermal/thermal_zone" + str(zone) + "/temp")
# command=sub.Popen(["cat","/sys/class/thermal/thermal_zone"+str(zone)+"/temp"],stderr=sub.PIPE,stdin=sub.PIPE,stdout=sub.PIPE)
# response=list(command.communicate())
response = command.read()
return response[:-1]
Expand Down

0 comments on commit f31652e

Please sign in to comment.