Ejemplo n.º 1
0
    def PermissionsOK():

        if MyPlatform.IsOSLinux() and os.geteuid() == 0:
            return True
        if MyPlatform.IsOSWindows():
            return True
        else:
            return False
Ejemplo n.º 2
0
    def GetPlatformStats(self, usemetric=None):

        if not usemetric == None:
            bMetric = usemetric
        else:
            bMetric = self.UseMetric
        Platform = MyPlatform(self.log, bMetric)

        return Platform.GetInfo()
Ejemplo n.º 3
0
    def GetPlatformStats(self, usemetric=None):

        PlatformInfo = collections.OrderedDict()

        if not usemetric == None:
            bMetric = usemetric
        else:
            bMetric = self.UseMetric
        Platform = MyPlatform(self.log, bMetric)

        return Platform.GetInfo()
Ejemplo n.º 4
0
    def InternetConnected(self):
        try:
            if MyPlatform.InterntConnected():
                Status = "OK"
            else:
                Status = "Disconnected"

            return Status
        except Exception as e1:
            return "Unknown" + ":" + str(e1)