Skip to content

Commit 9e720a6

Browse files
fix : minor edit in uptime and idletime
1 parent a37e9ba commit 9e720a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

orangetool/orangetool.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def uptime(DEBUG=False):
197197
try:
198198
command=open("/proc/uptime")
199199
response=command.read()
200-
return time_convert(response[:-1].split(" ")[1])
200+
return time_convert(response[:-1].split(" ")[0])
201201
except Exception as e:
202202
if DEBUG==True:
203203
print(str(e))
@@ -212,7 +212,7 @@ def idletime(DEBUG=False):
212212
try:
213213
command=open("/proc/uptime")
214214
response=command.read()
215-
return time_convert(response[:-1].split(" ")[0])
215+
return time_convert(response[:-1].split(" ")[1])
216216
except Exception as e:
217217
if DEBUG==True:
218218
print(str(e))

0 commit comments

Comments
 (0)