[nanny] Add win32 paths to nanny-desktop-blocker



commit 7e97a61dccf4586663e4b3c8df48ed56ae1b15da
Author: Roberto Majadas <roberto majadas openshine com>
Date:   Sat Sep 18 12:31:23 2010 +0200

    Add win32 paths to nanny-desktop-blocker

 client/gnome/admin/nanny-desktop-blocker |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/client/gnome/admin/nanny-desktop-blocker b/client/gnome/admin/nanny-desktop-blocker
index 95eb5e7..31dd6e4 100644
--- a/client/gnome/admin/nanny-desktop-blocker
+++ b/client/gnome/admin/nanny-desktop-blocker
@@ -20,11 +20,19 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
 # USA
 
-import syslog
+import os
+if os.name == "posix" :
+    import syslog
 import gtk 
 import gettext
 import __builtin__
 
+if os.name == "nt" :
+    import sys
+    root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+    nanny_lib_path = os.path.join(root_path, "lib", "python2.6", "site-packages")
+    sys.path.append(nanny_lib_path)
+
 import nanny.client.gnome.admin
 
 if __name__ == '__main__':



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