Author: jerome
Date: 2009-03-18 07:45:45 +0100 (Wed, 18 Mar 2009)
New Revision: 4109

Modified:
   
software_suite_v2/software/gadgets/tuxdroid-gadget-system/trunk/tuxdroid-gadget-system/executables/tuxdroid-gadget-system.py
Log:
*Fixed a dummy bug

Modified: 
software_suite_v2/software/gadgets/tuxdroid-gadget-system/trunk/tuxdroid-gadget-system/executables/tuxdroid-gadget-system.py
===================================================================
--- 
software_suite_v2/software/gadgets/tuxdroid-gadget-system/trunk/tuxdroid-gadget-system/executables/tuxdroid-gadget-system.py
        2009-03-17 10:42:29 UTC (rev 4108)
+++ 
software_suite_v2/software/gadgets/tuxdroid-gadget-system/trunk/tuxdroid-gadget-system/executables/tuxdroid-gadget-system.py
        2009-03-18 06:45:45 UTC (rev 4109)
@@ -86,12 +86,12 @@
                 #windows system.
                 cpu = self.__getWindowsCPULoad()
                 
-                if self.tgp_useCpuThreshold:
-                    #check threshold.
-                    if (float(cpu) > float(self.tgp_cpuThreshold)):
-                        print("message \"c p u meltdown\"")
-                else:   
-                    print("message \"Your c p u load is " + str(cpu) + " 
percent\"")
+            if self.tgp_useCpuThreshold:
+                #check threshold.
+                if (float(cpu) > float(self.tgp_cpuThreshold)):
+                    print("message \"c p u meltdown\"")
+            else:   
+                print("message \"Your c p u load is " + str(cpu) + " 
percent\"")
                  
         
         if self.tgp_giveMem:
@@ -102,11 +102,11 @@
             else:
                 memory = self.__getWindowsMemoryUsage()
                 
-                if self.tgp_useMemThreshold:
-                    if (float(memory) > float(self.tgp_memThreshold)):
-                        print("message \"memory is up\"")
-                else:    
-                    print("message \"Your used memory is " + str(memory) + " 
percent\"")
+            if self.tgp_useMemThreshold:
+                if (float(memory) > float(self.tgp_memThreshold)):
+                    print("message \"memory is up\"")
+            else:    
+                print("message \"Your used memory is " + str(memory) + " 
percent\"")
             
             
 
@@ -148,8 +148,8 @@
         i2 = float( datas.split()[4] )
         usage = (u2-u1) + (n2 - n1) + (s2 - s1)
         total = (u2-u1) + (n2 - n1) + (s2 - s1) + (i2 -i1)
-        lo = (usage/total)* 100
-        return lo
+        lo = int((usage/total)* 100)
+        return str(lo)
     
     
     
@@ -196,7 +196,7 @@
         free = get_freemem()
         used = get_usedmem()
 
-        return str(float((float(used) / (float(used) + float(free))) * 100.0))
+        return str(int((float(used) / (float(used) + float(free))) * 100.0))
     
     
     


------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to