@@ -54,7 +54,8 @@ def get_temp(zone=0, debug=False):
5454 print (str (e ))
5555 return GENERAL_ERROR_MESSAGE
5656
57- def time_control (mode = "uptime" ,debug = False ):
57+
58+ def time_control (mode = "uptime" , debug = False ):
5859 """
5960 Return system time.
6061
@@ -65,7 +66,7 @@ def time_control(mode="uptime",debug=False):
6566 :return: system time as string
6667 """
6768 index = 0
68- if mode in ["idle" ,"idletime" ]:
69+ if mode in ["idle" , "idletime" ]:
6970 index = 1
7071 try :
7172 command = open ("/proc/uptime" )
@@ -76,6 +77,7 @@ def time_control(mode="uptime",debug=False):
7677 print (str (e ))
7778 return GENERAL_ERROR_MESSAGE
7879
80+
7981def uptime (debug = False ):
8082 """
8183 Return system uptime.
@@ -84,7 +86,7 @@ def uptime(debug=False):
8486 :type debug:bool
8587 :return: system uptime as string
8688 """
87- return time_control (mode = "uptime" ,debug = debug )
89+ return time_control (mode = "uptime" , debug = debug )
8890
8991
9092def idletime (debug = False ):
@@ -126,7 +128,11 @@ def wakeup(day=0, hour=0, minute=0, sync=True, debug=False):
126128 """
127129 try :
128130 if sync :
129- _ = sub .Popen ("hwclock -w" ,stderr = sub .PIPE ,stdout = sub .PIPE ,stdin = sub .PIPE )
131+ _ = sub .Popen (
132+ "hwclock -w" ,
133+ stderr = sub .PIPE ,
134+ stdout = sub .PIPE ,
135+ stdin = sub .PIPE )
130136 total_time = day * 24 * 60 + hour * 60 + minute
131137 epoch = time .time () + total_time * 60
132138 file = open ("/sys/class/rtc/rtc0/wakealarm" , "w" )
0 commit comments