Commit 787eeae2 authored by Devaev Maxim's avatar Devaev Maxim

Moved uptime() to statistics module

parent ee364f87
......@@ -14,7 +14,6 @@ SERVICE_NAME = "common_info"
LSB_RELASE_METHODS_NAMESPACE = "commonInfo.lsb.release"
UNAME_METHODS_NAMESPACE = "commonInfo.uname"
TIME_METHODS_NAMESPACE = "commonInfo.time"
LSB_OPTION_VERSION = "--version"
LSB_OPTION_ID = "--id"
......@@ -96,17 +95,6 @@ class CommonInfo(service.FunctionObject) :
def operatingSystem(self) :
return self.unameOption(UNAME_OPTION_OPERATING_SYSTEM)
###
@service.functionMethod(TIME_METHODS_NAMESPACE, out_signature="d")
def uptime(self) :
uptime_file = open("/proc/uptime")
uptime = float(uptime_file.read().split()[0])
try :
uptime_file.close()
except : pass
return uptime
### Private ###
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment