[nanny] Fix Win32 bug



commit 94c814923a5c4b457f746f7218d3fde55b0f30f1
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Thu Sep 16 12:43:40 2010 +0200

    Fix Win32 bug

 daemon/src/Win32UsersManager.py |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/daemon/src/Win32UsersManager.py b/daemon/src/Win32UsersManager.py
index c1fd593..45d483a 100644
--- a/daemon/src/Win32UsersManager.py
+++ b/daemon/src/Win32UsersManager.py
@@ -34,7 +34,7 @@ class Win32UsersManager:
         
     def get_users (self):
         if self.last_time != None and time.time() - self.last_time <= 60 :
-            return users
+            return self.users
 
         users=[]
         oWMI = win32com.client.GetObject(r"winmgmts:\\.\root\cimv2")
@@ -45,6 +45,7 @@ class Win32UsersManager:
                 uid = str(result.SID).split("-")[-1]
                 users.append((uid, unicode(result.Name), unicode(result.FullName)))
         self.last_time = time.time()
+        self.users = users
         return users
 
     def has_changes (self):
@@ -53,5 +54,5 @@ class Win32UsersManager:
         
         if time.time() - self.last_time > 60 :
             return True
-
+        
         return False



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]