Commit beaefdfc authored by Seblu's avatar Seblu
Browse files

handler uptime return time in seconds

parent 4d841d18
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -67,8 +67,7 @@ class CliHandler(RpcHandler):
    def get_tag_uptime(self):
        '''Return uptime output'''
        try:
            p = subprocess.Popen(["uptime"], close_fds=True, shell=False, stdout=subprocess.PIPE)
            return  p.stdout.read().rstrip("\n")
            return int(float(open("/proc/uptime", "r").readline().split()[0]))
        except Exception:
            return ""
    get_tag_uptime.ttl = 3